mirror of https://github.com/node-red/node-red.git
Merge pull request #3213 from GerwinvBeek/markdown-regex
Improved regex for markdown rendererpull/3221/head
commit
35f617e96c
|
@ -27,7 +27,7 @@ RED.utils = (function() {
|
|||
level: 'block', // Is this a block-level or inline-level tokenizer?
|
||||
start(src) {
|
||||
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
|
||||
},
|
||||
tokenizer(src, tokens) {
|
||||
|
@ -53,7 +53,7 @@ RED.utils = (function() {
|
|||
level: 'inline', // Is this a block-level or inline-level tokenizer?
|
||||
start(src) {
|
||||
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
|
||||
},
|
||||
tokenizer(src, tokens) {
|
||||
|
|
Loading…
Reference in New Issue