diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index de931de..3e54f5b 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -101,7 +101,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...