1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-10 01:10:28 +00:00

fix: link end position should add ^id 's length

This commit is contained in:
lin onetwo 2024-06-09 23:01:07 +08:00
parent 6d16c98c9b
commit 9c2c6d724e

View File

@ -40,7 +40,7 @@ exports.parse = function() {
textEndPos = this.matchRegExp.lastIndex - 2;
}
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)) {
// add back the part after `^` to the ext link, if it happen to has one.
if(anchor) {