From 475a4d05db1fab25885da32bca23a7dbbf3e3f3a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 18 May 2025 21:39:12 +0300 Subject: [PATCH] feat(highlighting): add scala --- 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 1a9d32d53..2ade73440 100644 --- a/docs/Release Notes/Release Notes/v0.94.0.md +++ b/docs/Release Notes/Release Notes/v0.94.0.md @@ -42,6 +42,7 @@ * Added support for Jinja2. * Added support for ClojureScript. * Added support for Perl. + * Added support for Scala. * 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 5685d99ad..fa1af17a8 100644 --- a/packages/highlightjs/src/syntax_highlighting.ts +++ b/packages/highlightjs/src/syntax_highlighting.ts @@ -129,7 +129,7 @@ const byMimeType: MimeRecord = { "text/x-rustsrc": () => import("highlight.js/lib/languages/rust"), "text/x-sas": () => import("highlight.js/lib/languages/sas"), "text/x-sass": () => import("highlight.js/lib/languages/scss"), - "text/x-scala": null, + "text/x-scala": () => import("highlight.js/lib/languages/scala"), "text/x-scheme": null, "text/x-scss": () => import("highlight.js/lib/languages/scss"), "text/x-sh": () => import("highlight.js/lib/languages/bash"),