Compare commits

..

No commits in common. "2ddcf93faf7be37c5a5bca82b53360f7ac0cd6bd" and "436bf6ffae6b6068e58f321375d7a3601de2e999" have entirely different histories.

2 changed files with 7 additions and 47 deletions

View File

@ -538,52 +538,16 @@ var styling = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// XXX use ligatures for these??? // XXX use ligatures for these???
var symbols = { var symbols = {
__proto__: plugin, __proto__: plugin,
// XXX use a single regex with handler func to do these...
symbols: {
'>>': '»',
'<<': '«',
'->': '→',
'<-': '←',
'=>': '⇒',
'<=': '⇐',
'(i)': '🛈',
'(c)': '©',
'/!\\': '⚠',
},
get symbols_pattern(){
return (this.symbols != null
&& Object.keys(this.symbols).length > 0) ?
new RegExp(`(?<!\\\\)(${
Object.keys(this.symbols)
.join('|')
.replace(/([\(\)\\\/])/g, '\\$1') })`, 'g')
: undefined },
__parse__: function(text, editor, elem){ __parse__: function(text, editor, elem){
var that = this
var p = this.symbols_pattern
text = p ?
text.replace(p,
function(m){
return that.symbols[m] })
: text
return text return text
/* XXX // characters...
.replace(/(?<!\\)>>/gm, '»')
.replace(/(?<!\\)<</gm, '«')
.replace(/(?<![\\<])->/gm, '→')
.replace(/(?<![\\<])=>/gm, '⇒')
.replace(/(?<!\\)<-(?!>)/gm, '←')
.replace(/(?<!\\)<=(?!>)/gm, '⇐')
.replace(/(?<!\\)\(i\)/gm, '🛈') .replace(/(?<!\\)\(i\)/gm, '🛈')
.replace(/(?<!\\)\(c\)/gm, '©') .replace(/(?<!\\)\(c\)/gm, '©')
.replace(/(?<!\\)\/!\\/gm, '⚠') .replace(/(?<!\\)\/!\\/gm, '⚠')
//*/
.replace(/(?<!\\)---(?!-)/gm, '&mdash;') .replace(/(?<!\\)---(?!-)/gm, '&mdash;')
.replace(/(?<!\\)--(?!-)/gm, '&ndash;') }, .replace(/(?<!\\)--(?!-)/gm, '&ndash;') },
} }

View File

@ -51,14 +51,13 @@ var setup = function(){
- ASAP: mobile browsers behave quite chaotically ignoring parts of the styling... - ASAP: mobile browsers behave quite chaotically ignoring parts of the styling...
- ASAP: call `.sync()` on all changes... - ASAP: call `.sync()` on all changes...
- pgup/pgdown/home/end buttons - pgup/pgdown/home/end buttons
- identify a block (index, id, ...) - autofocus (option)
- focus - copy/paste nodes/trees
- `<editor>.autofocus`
- `focused:: true` attr (`.text(..)`/`.json(..)`/`.load(..)`)
- focusing editor -> focus focused block
- undo - undo
collapsed:: true collapsed:: true
- edit stack (position, action, ...) - delete node
- indent/deindent
- edit node
- auto-shift done blocks to the end of siblings... (option?) - auto-shift done blocks to the end of siblings... (option?)
- ...or should this be `sort:: done` -- i.e. sort children by done status?? - ...or should this be `sort:: done` -- i.e. sort children by done status??
- codeblock as a block - codeblock as a block
@ -69,7 +68,6 @@ var setup = function(){
code code
``` ```
- _bullet should be either in the middle of the block or at the first line of code (preferred)..._ - _bullet should be either in the middle of the block or at the first line of code (preferred)..._
- copy/paste nodes/trees
- FEATURE: read-only mode - FEATURE: read-only mode
- export html - export html
- embed css - embed css
@ -89,7 +87,6 @@ var setup = function(){
- `<editable/>` -- field marker - `<editable/>` -- field marker
- each child node will copy the template and allow editing of only fields - each child node will copy the template and allow editing of only fields
- not clear how to handle template changes... - not clear how to handle template changes...
- cli
- Q: do we use \\t for indent? (option???) - Q: do we use \\t for indent? (option???)
- Q: persistent empty first/last node (a button to create a new node)? - Q: persistent empty first/last node (a button to create a new node)?
- Q: should list bullets be on the same level as nodes or offset?? - Q: should list bullets be on the same level as nodes or offset??
@ -264,7 +261,6 @@ var setup = function(){
| 11 | 22 | 33 | | 11 | 22 | 33 |
- Symbols -- _should these be ligatures?_ - Symbols -- _should these be ligatures?_
- (i), (c), /!\, ... - (i), (c), /!\, ...
- <-, ->, <=, =>, <<, >> _(not sure about these)_
- -- and --- - -- and ---
- -
- --- - ---