From 50d8325d4c9f17892ec36e9fc818cfcb3655f150 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Wed, 9 Dec 2020 19:14:43 +0000 Subject: [PATCH] Dynannotate: Fix off-by-one error for end of annotation text --- plugins/tiddlywiki/dynannotate/modules/textmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tiddlywiki/dynannotate/modules/textmap.js b/plugins/tiddlywiki/dynannotate/modules/textmap.js index d1a3bdd27..9f9dbbbe3 100644 --- a/plugins/tiddlywiki/dynannotate/modules/textmap.js +++ b/plugins/tiddlywiki/dynannotate/modules/textmap.js @@ -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,