tweaks and notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-10-11 13:13:27 +03:00
parent 22a73a07e8
commit 8ef755c616
2 changed files with 15 additions and 3 deletions

View File

@ -193,7 +193,7 @@ var Outline = {
&& (data.collapsed ?
node.setAttribute('collapsed', '')
: node.removeAttribute('collapsed'))
if(data.text){
if(data.text != null){
var text = node.querySelector('textarea')
var html = node.querySelector('span')
if(this.__code2html__){
@ -352,10 +352,13 @@ var Outline = {
.replace(/\s*(?<!\\)\[[Xx]\]\s*/gm,
style('check', '<input type="checkbox" checked>'))
// basic styling...
// XXX revise...
.replace(/(?<!\\)\*(?=[^\s*])(([^*]|\\\*)*[^\s*])(?<!\\)\*/gm, '<b>$1</b>')
.replace(/(?<!\\)~(?=[^\s~])(([^~]|\\~)*[^\s~])(?<!\\)~/gm, '<s>$1</s>')
.replace(/(?<!\\)_(?=[^\s_])(([^_]|\\_)*[^\s_])(?<!\\)_/gm, '<i>$1</i>')
.replace(/(?<!\\)`(?=[^\s_])(([^`]|\\`)*[^\s_])(?<!\\)`/gm, '<code>$1</code>')
.replace(/(?<!\\)`(?=[^\s])(([^`]|\\`)*[^\s])(?<!\\)`/gm, '<code>$1</code>')
// XXX support "\==" in mark...
.replace(/(?<!\\)==(?=[^\s])(.*[^\s])(?<!\\)==/gm, '<mark>$1</mark>')
// characters...
// XXX use ligatures for these???
.replace(/(?<!\\)---(?!-)/gm, '&mdash;')

View File

@ -78,8 +78,16 @@ var setup = function(){
- indent/deindent
- edit node
- markdown: tables
- /^\s*(\|\s+.*\s+\|)\s*$/m -&gt; &lt;table&gt;&lt;tr&gt;&lt;td&gt;$1&lt;/td&gt;&lt;/tr&gt;&lt;table&gt;
- /\n\s*\|\s+/ -&gt; &lt;tr&gt;&lt;td&gt;
- /\s+\|\s*\n/ -&gt; &lt;/td&gt;&lt;/tr&gt;
- /\s+\|\s+/ -&gt; &lt;/td&gt;&lt;td&gt;
- ASAP: fix quotes...
- empty item height is a bit off...
- handle links gracefully
- ~handle links gracefully -- open/edit
_just click in the empty space_~
- ~<a href="about:blank">this takes the whole element</a>~
- this breaks if link is exactly line width -- should we ensure empty space?
- ~serialize/deserialize~
- ~add optional text styling to nodes~
-
@ -110,6 +118,7 @@ var setup = function(){
- ---
- Markers: ASAP, BUG, FIX, HACK, STUB, WARNING, and CAUTION
- Basic inline *bold*, _italic_ and ~striked~
- Marking ==text==
- Inline [X] checkboxes [_]
- To do items/blocks
- [_] undone item