mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +01:00
feat(export/md): rewrite JavaScript code block languages
This commit is contained in:
@@ -38,11 +38,15 @@ function rewriteLanguageTag(source: string) {
|
||||
return source;
|
||||
}
|
||||
|
||||
if (source === "text-x-trilium-auto") {
|
||||
return "";
|
||||
switch (source) {
|
||||
case "text-x-trilium-auto":
|
||||
return "";
|
||||
case "application-javascript-env-frontend":
|
||||
case "application-javascript-env-backend":
|
||||
return "javascript";
|
||||
default:
|
||||
return source.split("-").at(-1);
|
||||
}
|
||||
|
||||
return source.split("-").at(-1);
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user