Skip to content

Commit

Permalink
Also highlight TypeScript (.ts) as JavaScript
Browse files Browse the repository at this point in the history
As TypeScript extends JavaScript to add types, the basics of JavaScript still apply.
This change will parse `.ts` files as if they are JavaScript files, providing basic highlighting support.
  • Loading branch information
moorscode committed Nov 21, 2020
1 parent 6130726 commit ed51c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript.nanorc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
syntax "JavaScript" "\.js$"
syntax "JavaScript" "\.(js|ts)$"
comment "//"
color blue "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
color blue "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
Expand Down

0 comments on commit ed51c7c

Please sign in to comment.