Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(read-only-note): syntax highlight not working (closes #668)
Elian Doranb351293ea8a2
diff --git a/src/public/app/services/syntax_highlight.js b/src/public/app/services/syntax_highlight.jsindex 1cb76c426d..c9f9449eb8 100644--- a/src/public/app/services/syntax_highlight.js+++ b/src/public/app/services/syntax_highlight.js@@ -32,7 +32,7 @@ export async function applySyntaxHighlight($container) {continue;}- applySingleBlockSyntaxHighlight($(codeBlock, normalizedMimeType));+ applySingleBlockSyntaxHighlight($(codeBlock), normalizedMimeType);}}@@ -86,7 +86,7 @@ function extractLanguageFromClassList(el) {const prefix = "language-";for (const className of el.classList) {if (className.startsWith(prefix)) {- return className.substr(prefix.length);+ return className.substring(prefix.length);}}