Skip to content

Commit ea6f853

Browse files
committed
update highlighter to include file extension aliases
1 parent 6be7942 commit ea6f853

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/utils/highlighter.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as shiki from "@gerrit0/mini-shiki";
22
import { JSX, unique } from "#utils";
33
import assert from "assert";
44

5-
const aliases = new Map<string, string>();
5+
const aliases = new Map<string, string>([['mts', 'typescript'], ['cts', 'typescript']]);
66
for (const lang of shiki.bundledLanguagesInfo) {
77
for (const alias of lang.aliases || []) {
88
aliases.set(alias, lang.id);
@@ -175,7 +175,7 @@ export function getSupportedThemes(): string[] {
175175

176176
export function isLoadedLanguage(lang: string): boolean {
177177
return (
178-
plaintextLanguages.includes(lang) || ignoredLanguages?.includes(lang) || highlighter?.supports(lang) || false
178+
isSupportedLanguage(lang) || highlighter?.supports(lang) || false
179179
);
180180
}
181181

0 commit comments

Comments
 (0)