From f83be0e1d7749c32051d5a46cffb3e02b0c2ac53 Mon Sep 17 00:00:00 2001 From: blankie Date: Mon, 16 Oct 2023 17:42:19 +1100 Subject: [PATCH] Add support for .mjs files --- javascript.nanorc | 2 +- js.nanorc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript.nanorc b/javascript.nanorc index 2cdd4a2..6e5800e 100644 --- a/javascript.nanorc +++ b/javascript.nanorc @@ -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]?" diff --git a/js.nanorc b/js.nanorc index 8991928..820112e 100644 --- a/js.nanorc +++ b/js.nanorc @@ -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 @@ -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 "//"