1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Dynannotate: Fix off-by-one error for end of annotation text

This commit is contained in:
jeremy@jermolene.com 2020-12-09 19:14:43 +00:00
parent 3016b3d094
commit 50d8325d4c

View File

@ -78,7 +78,7 @@ exports.TextMap.prototype.findText = function(targetString,targetPrefix,targetSu
if(startPos !== -1) {
startPos += targetPrefix.length;
var startMetadata = this.locateMetadata(startPos),
endMetadata = this.locateMetadata(startPos + targetString.length);
endMetadata = this.locateMetadata(startPos + targetString.length - 1);
if(startMetadata && endMetadata) {
return {
startNode: startMetadata.domNode,