mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	Support highlighting Elixir code notes.
This commit is contained in:
		| @@ -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 }, | ||||
|   | ||||
| @@ -84,6 +84,7 @@ const byMimeType: Record<string, (() => Promise<StreamParser<unknown> | Language | ||||
|     "text/x-ebnf": async () => (await import('@codemirror/legacy-modes/mode/ebnf')).ebnf, | ||||
|     "text/x-ecl": async () => (await import('@codemirror/legacy-modes/mode/ecl')).ecl, | ||||
|     "text/x-eiffel": async () => (await import('@codemirror/legacy-modes/mode/eiffel')).eiffel, | ||||
|     "text/x-elixir": async () => (await import('@codemirror/legacy-modes/mode/elixir')).elixir, | ||||
|     "text/x-elm": async () => (await import('@codemirror/legacy-modes/mode/elm')).elm, | ||||
|     "text/x-erlang": async () => (await import('@codemirror/legacy-modes/mode/erlang')).erlang, | ||||
|     "text/x-esper": async () => (await import('@codemirror/legacy-modes/mode/sql')).esper, | ||||
|   | ||||
| @@ -71,6 +71,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, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user