mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-08 17:22:29 +08:00
fix(import/mime): fix TypeScript handling
.ts file are now treated as code type with text/x-typescript as MIME type fixes #1142
This commit is contained in:
parent
5d019137fa
commit
2d1381b4f8
@ -37,6 +37,7 @@ const CODE_MIME_TYPES = new Set([
|
|||||||
"text/x-sql",
|
"text/x-sql",
|
||||||
"text/x-stex",
|
"text/x-stex",
|
||||||
"text/x-swift",
|
"text/x-swift",
|
||||||
|
"text/x-typescript",
|
||||||
"text/x-yaml"
|
"text/x-yaml"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -65,7 +66,8 @@ const EXTENSION_TO_MIME = new Map<string, string>([
|
|||||||
[".py", "text/x-python"],
|
[".py", "text/x-python"],
|
||||||
[".rb", "text/x-ruby"],
|
[".rb", "text/x-ruby"],
|
||||||
[".scala", "text/x-scala"],
|
[".scala", "text/x-scala"],
|
||||||
[".swift", "text/x-swift"]
|
[".swift", "text/x-swift"],
|
||||||
|
[".ts", "text/x-typescript"]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** @returns false if MIME is not detected */
|
/** @returns false if MIME is not detected */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user