mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Improved regex for markdown renderer
This commit is contained in:
parent
21304a695c
commit
836f7d2163
@ -27,7 +27,7 @@ RED.utils = (function() {
|
|||||||
level: 'block', // Is this a block-level or inline-level tokenizer?
|
level: 'block', // Is this a block-level or inline-level tokenizer?
|
||||||
start(src) {
|
start(src) {
|
||||||
if (!src) { return null; }
|
if (!src) { return null; }
|
||||||
let m = src.match(/:[^:\n]/);
|
let m = src.match(/:[^:\n]/g);
|
||||||
return m && m.index; // Hint to Marked.js to stop and check for a match
|
return m && m.index; // Hint to Marked.js to stop and check for a match
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
@ -53,7 +53,7 @@ RED.utils = (function() {
|
|||||||
level: 'inline', // Is this a block-level or inline-level tokenizer?
|
level: 'inline', // Is this a block-level or inline-level tokenizer?
|
||||||
start(src) {
|
start(src) {
|
||||||
if (!src) { return null; }
|
if (!src) { return null; }
|
||||||
let m = src.match(/:/);
|
let m = src.match(/:/g);
|
||||||
return m && m.index; // Hint to Marked.js to stop and check for a match
|
return m && m.index; // Hint to Marked.js to stop and check for a match
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
|
Loading…
Reference in New Issue
Block a user