Skip to content

Commit 529f9a2

Browse files
committed
Merge branch 'main' into siriusbcd_close_split
2 parents 6b0bcf9 + 64a756c commit 529f9a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/server/src/share/content_renderer.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@ function renderText(result: Result, note: SNote | BNote) {
325325

326326
// Apply syntax highlight.
327327
for (const codeEl of document.querySelectorAll("pre code")) {
328+
if (codeEl.classList.contains("language-mermaid") && note.type === "text") {
329+
// Mermaid is handled on client-side, we don't want to break it by adding syntax highlighting.
330+
continue;
331+
}
332+
328333
const highlightResult = highlightAuto(codeEl.innerText);
329334
codeEl.innerHTML = highlightResult.value;
330335
codeEl.classList.add("hljs");

0 commit comments

Comments
 (0)