mirror of
https://github.com/zadam/trilium.git
synced 2025-11-21 16:14:23 +01:00
Merge branch 'main' into siriusbcd_close_split
Some checks failed
Checks / main (push) Has been cancelled
Some checks failed
Checks / main (push) Has been cancelled
This commit is contained in:
commit
529f9a2fb9
@ -325,6 +325,11 @@ function renderText(result: Result, note: SNote | BNote) {
|
||||
|
||||
// Apply syntax highlight.
|
||||
for (const codeEl of document.querySelectorAll("pre code")) {
|
||||
if (codeEl.classList.contains("language-mermaid") && note.type === "text") {
|
||||
// Mermaid is handled on client-side, we don't want to break it by adding syntax highlighting.
|
||||
continue;
|
||||
}
|
||||
|
||||
const highlightResult = highlightAuto(codeEl.innerText);
|
||||
codeEl.innerHTML = highlightResult.value;
|
||||
codeEl.classList.add("hljs");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user