A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: do not throw if language grammar is not found on export
Abdullah Attafb34dd2864f6
diff --git a/packages/core/utils/templates/html/builder.js b/packages/core/utils/templates/html/builder.jsindex 54c289753..b6e160fa7 100644--- a/packages/core/utils/templates/html/builder.js+++ b/packages/core/utils/templates/html/builder.js@@ -69,7 +69,9 @@ async function preprocessHTML(templateData) {const { loadLanguage } = hasRequire()? require("../../../../editor/languages/index.js"): await import("../../../../editor/languages/index.js");- prismjs.register = () => {};+ prismjs.register = (syntax) => {+ if (typeof arg === "function") syntax(prismjs);+ };for (const codeblock of codeblocks) {const language = LANGUAGE_REGEX.exec(codeblock.parentElement.className@@ -78,6 +80,7 @@ async function preprocessHTML(templateData) {const { default: grammar } = await loadLanguage(language);grammar(prismjs);+ if (!prismjs.languages[language]) continue;codeblock.innerHTML = prismjs.highlight(codeblock.textContent,