From 38d32813d21b01e33fbfa70d43bc406f84ee18bc Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 12 Nov 2024 19:32:38 +0200 Subject: [PATCH] client: Fix syntax highlight for shell scripts (closes #583) --- src/public/app/services/mime_types.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/public/app/services/mime_types.js b/src/public/app/services/mime_types.js index 96f195e0c..0aef44ecf 100644 --- a/src/public/app/services/mime_types.js +++ b/src/public/app/services/mime_types.js @@ -5,6 +5,10 @@ import options from "./options.js"; */ const MIME_TYPE_AUTO = "text-x-trilium-auto"; +/** + * For highlight.js-supported languages, see https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md. + */ + const MIME_TYPES_DICT = [ { default: true, title: "Plain text", mime: "text/plain", highlightJs: "plaintext" }, { title: "APL", mime: "text/apl" }, @@ -119,7 +123,7 @@ const MIME_TYPES_DICT = [ { title: "Scala", mime: "text/x-scala" }, { title: "Scheme", mime: "text/x-scheme" }, { title: "SCSS", mime: "text/x-scss", highlightJs: "scss" }, - { default: true, title: "Shell (bash)", mime: "text/x-sh", highlightJs: "shell" }, + { default: true, title: "Shell (bash)", mime: "text/x-sh", highlightJs: "bash" }, { title: "Sieve", mime: "application/sieve" }, { title: "Slim", mime: "text/x-slim" }, { title: "Smalltalk", mime: "text/x-stsrc", highlightJs: "smalltalk" },