From 4cfa65f60c16428c0a55a68c7cd99bb38d5193c4 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 29 Oct 2023 15:53:05 +0300 Subject: [PATCH] fixes... Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.js | 4 ++-- experiments/outline-editor/index.html | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index c714651..61a8396 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -1461,9 +1461,9 @@ var Outline = { parse: function(text){ var that = this text = text - .replace(/^\s*\n/, '') + .replace(/^[ \t]*\n/, '') text = ('\n' + text) - .split(/\n(\s*)(?:- |-\s*$)/gm) + .split(/\n([ \t]*)(?:- |-\s*$)/gm) .slice(1) var tab = ' '.repeat(this.tab_size || 8) var level = function(lst, prev_sep=undefined, parent=[]){ diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index f4f76ab..b44ee3b 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -48,6 +48,11 @@ var setup = function(){ - - ## Bugs: focused:: true + - BUG: trailing whitespace is ignored in view... + - this node has a second empty line + + - this is a sibling to the above node + - _see code_ - BUG: mobile browsers behave quite chaotically ignoring parts of the styling... - FF: - zooming on edited field @@ -387,16 +392,14 @@ var setup = function(){ - + - the only exception is the closing textarea tag
-- ## raw outline editor element +- ## raw outline editor `<element>` - the children are not protected - - any html are going to be parsed by the browser - + - any html are going to be parsed by the browser