From 2ab71cf49cad010e002cb862803245ba9b7a790a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 18 Oct 2023 20:04:39 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 914bb16..29d97ee 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -344,11 +344,14 @@ var tasks = { __setup__: function(editor){ return this.updateAllStatus(editor) }, - __parse__: function(text, editor, elem){ + __pre_parse__: function(text, editor, elem){ // handle done.. + var handler = this.style(editor, elem, 'DONE') for(var p of this.done_patterns){ - test = text - .replace(p, this.style(editor, elem, 'DONE')) } + text = text + .replace(p, handler) } + return text }, + __parse__: function(text, editor, elem){ return text // block checkboxes... // NOTE: these are separate as we need to align block text