Highlight Elixir in code notes (#2327)

This commit is contained in:
Elian Doran 2025-06-16 17:50:51 +03:00 committed by GitHub
commit 26af3a9d68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@ const CODE_MIME_TYPES = new Set([
"text/x-c++src",
"text/x-csrc",
"text/x-dockerfile",
"text/x-elixir",
"text/x-erlang",
"text/x-feature",
"text/x-go",
@ -55,6 +56,8 @@ const EXTENSION_TO_MIME = new Map<string, string>([
[".cs", "text/x-csharp"],
[".clj", "text/x-clojure"],
[".erl", "text/x-erlang"],
[".ex", "text/x-elixir"],
[".exs", "text/x-elixir"],
[".hrl", "text/x-erlang"],
[".feature", "text/x-feature"],
[".go", "text/x-go"],

View File

@ -98,7 +98,7 @@ const defaultOptions: DefaultOption[] = [
{ name: "codeLineWrapEnabled", value: "true", isSynced: false },
{
name: "codeNotesMimeTypes",
value: '["text/x-csrc","text/x-c++src","text/x-csharp","text/css","text/x-go","text/x-groovy","text/x-haskell","text/html","message/http","text/x-java","application/javascript;env=frontend","application/javascript;env=backend","application/json","text/x-kotlin","text/x-markdown","text/x-perl","text/x-php","text/x-python","text/x-ruby",null,"text/x-sql","text/x-sqlite;schema=trilium","text/x-swift","text/xml","text/x-yaml","text/x-sh","application/typescript"]',
value: '["text/x-csrc","text/x-c++src","text/x-csharp","text/css","text/x-elixir","text/x-go","text/x-groovy","text/x-haskell","text/html","message/http","text/x-java","application/javascript;env=frontend","application/javascript;env=backend","application/json","text/x-kotlin","text/x-markdown","text/x-perl","text/x-php","text/x-python","text/x-ruby",null,"text/x-sql","text/x-sqlite;schema=trilium","text/x-swift","text/xml","text/x-yaml","text/x-sh","application/typescript"]',
isSynced: true
},
{ name: "leftPaneWidth", value: "25", isSynced: false },

View File

@ -69,6 +69,7 @@ export const MIME_TYPES_DICT: readonly MimeTypeDefinition[] = Object.freeze([
{ title: "ECL", mime: "text/x-ecl" },
{ title: "edn", mime: "application/edn" },
{ title: "Eiffel", mime: "text/x-eiffel" },
{ title: "Elixir", mime: "text/x-elixir", mdLanguageCode: "elixir" },
{ title: "Elm", mime: "text/x-elm", mdLanguageCode: "elm" },
{ title: "Embedded Javascript", mime: "application/x-ejs" },
{ title: "Embedded Ruby", mime: "application/x-erb", mdLanguageCode: "erb" },

View File

@ -64,6 +64,7 @@ const byMimeType: MimeRecord = {
"text/x-ebnf": () => import("highlight.js/lib/languages/ebnf"),
"text/x-ecl": null,
"text/x-eiffel": null,
"text/x-elixir": () => import("highlight.js/lib/languages/elixir"),
"text/x-elm": () => import("highlight.js/lib/languages/elm"),
"text/x-erlang": () => import("highlight.js/lib/languages/erlang"),
"text/x-esper": null,