From a66648cc2fd1eca003e8afcd6bc19a6305700927 Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 22 Apr 2026 19:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20add=20mermaid=20to=20code?= =?UTF-8?q?=20block=20language=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The codemirror-block plugin's MODES array was missing "mermaid", causing mermaid code blocks to be converted to "plain" when loading a message for editing. After saving, the block renders as plaintext instead of a diagram. Closes lobehub/lobehub#12307 --- src/plugins/codemirror-block/lib/mode.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/codemirror-block/lib/mode.ts b/src/plugins/codemirror-block/lib/mode.ts index 5787e81d..a627aa9f 100644 --- a/src/plugins/codemirror-block/lib/mode.ts +++ b/src/plugins/codemirror-block/lib/mode.ts @@ -62,6 +62,12 @@ export const MODES = [ syntax: 'markdown', value: 'markdown', }, + { + ext: ['mmd'], + name: 'Mermaid', + syntax: 'simplemode', + value: 'mermaid', + }, { name: 'MATLAB', syntax: 'octave', value: 'matlab' }, { ext: ['conf'], name: 'Nginx', syntax: 'nginx', value: 'nginx' }, {