mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-10 09:20:26 +00:00
fix: link end position should add ^id 's length
This commit is contained in:
parent
6d16c98c9b
commit
9c2c6d724e
@ -40,7 +40,7 @@ exports.parse = function() {
|
|||||||
textEndPos = this.matchRegExp.lastIndex - 2;
|
textEndPos = this.matchRegExp.lastIndex - 2;
|
||||||
}
|
}
|
||||||
var linkStart = this.match[2] ? (start + this.match[1].length + 1) : start;
|
var linkStart = this.match[2] ? (start + this.match[1].length + 1) : start;
|
||||||
var linkEnd = linkStart + link.length;
|
var linkEnd = anchor ? (linkStart + link.length + 1 + anchor.length) : (linkStart + link.length);
|
||||||
if($tw.utils.isLinkExternal(link)) {
|
if($tw.utils.isLinkExternal(link)) {
|
||||||
// add back the part after `^` to the ext link, if it happen to has one.
|
// add back the part after `^` to the ext link, if it happen to has one.
|
||||||
if(anchor) {
|
if(anchor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user