mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
clean up temp enable flag
This commit is contained in:
parent
f0b03b4ada
commit
c0a256306b
@ -22,7 +22,6 @@ RED.utils = (function() {
|
|||||||
return renderMarkdown(txt);
|
return renderMarkdown(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
let enable = true;
|
|
||||||
const descriptionList = {
|
const descriptionList = {
|
||||||
name: 'descriptionList',
|
name: 'descriptionList',
|
||||||
level: 'block', // Is this a block-level or inline-level tokenizer?
|
level: 'block', // Is this a block-level or inline-level tokenizer?
|
||||||
@ -52,11 +51,11 @@ RED.utils = (function() {
|
|||||||
name: 'description',
|
name: 'description',
|
||||||
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 (!enable) return null
|
if (!src) return null
|
||||||
src.match(/:/)?.index; // Hint to Marked.js to stop and check for a match
|
src.match(/:/)?.index; // Hint to Marked.js to stop and check for a match
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
if (!enable) return null;
|
if (!src) return null;
|
||||||
const rule = /^:([^:\n]+)\(([^:\n]+)\).*?:([^:\n]*)(?:\n|$)/; // Regex for the complete token
|
const rule = /^:([^:\n]+)\(([^:\n]+)\).*?:([^:\n]*)(?:\n|$)/; // Regex for the complete token
|
||||||
const match = rule.exec(src);
|
const match = rule.exec(src);
|
||||||
if (match) {
|
if (match) {
|
||||||
|
Loading…
Reference in New Issue
Block a user