Highlight Key Value pair without value
This commit is contained in:
parent
707f84ec43
commit
da1feee2a2
|
@ -357,10 +357,13 @@ function Editor(holder, input) {
|
|||
} else if (converted.startsWith("=", 0)) {
|
||||
converted = transformMathExpression(converted, scope);
|
||||
} else {
|
||||
let re = /^([A-Z0-9 ]+)::\s*(.+)$/i;
|
||||
let re = /^([A-Z0-9 ]+)::\s*(.*)$/i;
|
||||
let res = text.match(re)
|
||||
if (res) {
|
||||
converted = '<span class="metadata-key">[[' + res[1] + ']]</span>: ' + res[2]
|
||||
converted = '<span class="metadata-key">[[' + res[1] + ']]</span>'
|
||||
if (res[2]) {
|
||||
converted += ': ' + res[2]
|
||||
}
|
||||
} else if (text.match(/#\[\[TODO]]/)) {
|
||||
converted = converted.replace('#[[TODO]]', '<input class="checkbox" type="checkbox" />')
|
||||
todo = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user