Skip to content

Commit

Permalink
Fixed wrong elk detector, check only beginning of the line for diagra…
Browse files Browse the repository at this point in the history
…m keywords
  • Loading branch information
nirname committed Jun 19, 2024
1 parent 0044aa3 commit 5587011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mermaid-flowchart-elk/src/detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const detector: DiagramDetector = (txt, config): boolean => {
// If diagram explicitly states flowchart-elk
/^\s*flowchart-elk/.test(txt) ||
// If a flowchart/graph diagram has their default renderer set to elk
(/^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')
(/^\s*(flowchart|graph)/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')
) {
return true;
}
Expand Down

0 comments on commit 5587011

Please sign in to comment.