From 670d8b576090b7ae79f107e6525894adde284ca1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 19 Oct 2023 15:07:51 +0300 Subject: [PATCH] minor fix Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 93270d6..69e73fd 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -87,7 +87,7 @@ var getMarkdownOffset = function(markdown, text, i){ i = i ?? text.length var m = 0 // walk both strings skipping/counting non-matching stuff... - for(var n=0; n < i; n++, m++){ + for(var n=0; n <= i; n++, m++){ var c = text[n] var p = m // walk to next match...