mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
Highlight Elixir in code notes (#2327)
This commit is contained in:
commit
26af3a9d68
@ -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"],
|
||||
|
@ -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 },
|
||||
|
@ -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" },
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user