Skip to content

Commit

Permalink
Add Typescript support for .cts and .mts (#1978)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
gspetrou committed Jul 25, 2023
1 parent 9d7ce06 commit fa7c89d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/typescript.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Typescript < Javascript
tag 'typescript'
aliases 'ts'

filenames '*.ts', '*.d.ts'
filenames '*.ts', '*.d.ts', '*.cts', '*.mts'

mimetypes 'text/typescript'
end
Expand Down

0 comments on commit fa7c89d

Please sign in to comment.