From dd77811f0d96bca5b2f860ae044eaed39e4beb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Salavisa?= Date: Tue, 17 Mar 2026 14:40:53 +0000 Subject: [PATCH] fix(web): prevent mermaid false positive detection (#443) --- apps/web/components/editors/tiptap/tiptap-mermaid-extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/components/editors/tiptap/tiptap-mermaid-extension.ts b/apps/web/components/editors/tiptap/tiptap-mermaid-extension.ts index 53279adcfc..ba7c77c9b8 100644 --- a/apps/web/components/editors/tiptap/tiptap-mermaid-extension.ts +++ b/apps/web/components/editors/tiptap/tiptap-mermaid-extension.ts @@ -50,7 +50,7 @@ const MERMAID_KEYWORDS = [ "zenuml", ]; -const MERMAID_RE = new RegExp(`^\\s*(?:${MERMAID_KEYWORDS.join("|")})(?:\\s|$)`, "m"); +const MERMAID_RE = new RegExp(`^\\s*(?:${MERMAID_KEYWORDS.join("|")})(?:\\s|$)`); /** Detect mermaid content by language tag OR by first-line keyword. */ export function isMermaidContent(language: string | null | undefined, text: string): boolean {