Skip to content

Commit fa7c89d

Browse files
authored
Add Typescript support for .cts and .mts (#1978)
Adds Typescript syntax highlighting to `.cts` and `.mts` files. These file extensions only specify to Typescript/Node what module system to use. They use the same syntax highlighting as `.ts` files. More info [here](https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions).
1 parent 9d7ce06 commit fa7c89d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rouge/lexers/typescript.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Typescript < Javascript
1515
tag 'typescript'
1616
aliases 'ts'
1717

18-
filenames '*.ts', '*.d.ts'
18+
filenames '*.ts', '*.d.ts', '*.cts', '*.mts'
1919

2020
mimetypes 'text/typescript'
2121
end

0 commit comments

Comments
 (0)