mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
pref: change detectors from .match
into .test
there is no need for matching, capturing results, and validating nullablity just using `.test` would be enough and significantly faster for more info, see https://stackoverflow.com/10940138/16476610
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import type { ExternalDiagramDefinition } from 'mermaid';
|
||||
|
||||
const id = 'zenuml';
|
||||
const regexp = /^\s*zenuml/;
|
||||
|
||||
const detector = (txt: string) => {
|
||||
return txt.match(regexp) !== null;
|
||||
return /^\s*zenuml/.test(txt);
|
||||
};
|
||||
|
||||
const loader = async () => {
|
||||
|
Reference in New Issue
Block a user