From a8f810becda550aedd8189c64cd7b313a4f6029d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 18 May 2025 21:22:33 +0300 Subject: [PATCH] feat(highlighting): add XML-DTD --- docs/Release Notes/Release Notes/v0.94.0.md | 1 + packages/highlightjs/src/syntax_highlighting.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Release Notes/Release Notes/v0.94.0.md b/docs/Release Notes/Release Notes/v0.94.0.md index 3b2c8e54a..21d9b2cb5 100644 --- a/docs/Release Notes/Release Notes/v0.94.0.md +++ b/docs/Release Notes/Release Notes/v0.94.0.md @@ -38,6 +38,7 @@ * Note: syntax highlighting for some languages (mostly HTML-template languages such as EJS, JSP) is no longer supported due to lack of upstream support. If this is a problem, feel free to report an issue and we can see what can be done about it. * Syntax highlighting in code blocks for text notes: * Added support for Cypher. + * Added support for XML-DTD. * Mermaid diagrams: basic syntax highlight (not all diagram types are supported) and code folding. * Slight organization in Appearance settings: code block themes are now in "Text Notes", added a "Related settings" section in Appearance. * [Added support for opening and activating a note in a new tab using Ctrl+Shift+click on notes in the launcher pane, note tree, or note images](https://github.com/TriliumNext/Notes/pull/1854) by @SiriusXT diff --git a/packages/highlightjs/src/syntax_highlighting.ts b/packages/highlightjs/src/syntax_highlighting.ts index f5d4abf86..2560965e6 100644 --- a/packages/highlightjs/src/syntax_highlighting.ts +++ b/packages/highlightjs/src/syntax_highlighting.ts @@ -24,7 +24,7 @@ const byMimeType: MimeRecord = { "application/x-erb": () => import("highlight.js/lib/languages/erb"), "application/x-jsp": () => import("highlight.js/lib/languages/java"), "application/x-powershell": () => import("highlight.js/lib/languages/powershell"), - "application/xml-dtd": null, + "application/xml-dtd": () => import("highlight.js/lib/languages/xml"), "application/xquery": () => import("highlight.js/lib/languages/xquery"), "message/http": () => import("highlight.js/lib/languages/http"), "text/apl": null,