Skip to content

Commit

Permalink
Add support for .mjs files
Browse files Browse the repository at this point in the history
Originally proposed in scopatz#418
  • Loading branch information
the-blank-x authored and davidhcefx committed Feb 3, 2024
1 parent 6ca4ffa commit 30a1492
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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|ts)$"
syntax "JavaScript" "\.(m?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
4 changes: 2 additions & 2 deletions js.nanorc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### all *js files ( e.g. Firefox user.js, prefs.js )
### all *js and *mjs files ( e.g. Firefox user.js, prefs.js )

## Old version

Expand All @@ -12,7 +12,7 @@

## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting

syntax "JavaScript" "\.(js)$"
syntax "JavaScript" "\.(m?js)$"
header "^#!.*\/(env +)node"
comment "//"

Expand Down

0 comments on commit 30a1492

Please sign in to comment.