mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix grunt errors
This commit is contained in:
parent
aa1721ab3d
commit
8a2e74b3b8
@ -26,11 +26,12 @@ RED.utils = (function() {
|
|||||||
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?
|
||||||
start(src) {
|
start(src) {
|
||||||
if (!src) return null
|
if (!src) { return null; }
|
||||||
return src.match(/:[^:\n]/)?.index; // Hint to Marked.js to stop and check for a match
|
let m = src.match(/:[^:\n]/);
|
||||||
|
return m && m.index; // Hint to Marked.js to stop and check for a match
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
if (!src) return null;
|
if (!src) { return null; }
|
||||||
const rule = /^(?::[^:\n]+:[^:\n]*(?:\n|$))+/; // Regex for the complete token
|
const rule = /^(?::[^:\n]+:[^:\n]*(?:\n|$))+/; // Regex for the complete token
|
||||||
const match = rule.exec(src);
|
const match = rule.exec(src);
|
||||||
if (match) {
|
if (match) {
|
||||||
@ -51,11 +52,12 @@ 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 (!src) return null
|
if (!src) { return null; }
|
||||||
src.match(/:/)?.index; // Hint to Marked.js to stop and check for a match
|
let m = src.match(/:/);
|
||||||
|
return m & m.index; // Hint to Marked.js to stop and check for a match
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
if (!src) 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…
x
Reference in New Issue
Block a user