From 54b7ae94ca1ceb3b49aebeed7d96b5bed0ff5c3b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 6 Nov 2023 03:18:08 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.js | 1 + experiments/outline-editor/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 78bf43e..edad0dc 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -119,6 +119,7 @@ var getCharOffset = function(elem, x, y, data){ // | // markdown: '# Hea|ding' // +// XXX we are not checking both lengths of markdown AND text... var getMarkdownOffset = function(markdown, text, i){ i = i ?? text.length var m = 0 diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index d45c97f..1b86a85 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -66,7 +66,7 @@ var setup = function(){ getMarkdownOffset(m, t, 26) ``` this returns `69` while it should return `5` - _...replacing `\n\n\n` with `\n\n` seems to fix the issue_ + _...replacing `\n\n\n` with `\n\n` seems to fix the issue (also works with spaces)_ (BUG also the above line is not italic -- can't reproduce) - DONE clicking right of this line will select last line of block ```