From 9a3e96cf0941857883fa82bb214cffffe230a29c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 30 Oct 2023 18:06:13 +0300 Subject: [PATCH] made block status toggle more flexible... Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.css | 6 +- experiments/outline-editor/editor.js | 79 +++++++++++++++++++++------ experiments/outline-editor/index.html | 6 +- 3 files changed, 72 insertions(+), 19 deletions(-) diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index 38a0251..19f8339 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -489,13 +489,17 @@ editor .outline .block:focus { } -/*---------------------------------------------------------- Done ---*/ +/*-------------------------------------------------------- Status ---*/ .editor .outline .block.DONE>.view { text-decoration: line-through; opacity: 0.5; } +.editor .outline .block.REJECT>.view { + text-decoration: line-through; +} + /*--------------------------------------------------- Highlightes ---*/ diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index bce731c..6a41ab8 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -273,10 +273,26 @@ var quoted = { var tasks = { __proto__: plugin, - done_patterns: [ - /^\s*(?: , + // ... + // ] + __status_patterns: undefined, + __status_pattern_tpl: `^(?:\\s*(?