### all *js files ( e.g. Firefox user.js, prefs.js ) ## Old version #syntax "JavaScript" "(\.|/|)js$" #color green "//.*$" (s) "\/\*.*?\*\/" #color blue "'(\\.|[^'])*'" #color red ""(\\.|[^\"])*"" #color brightgreen "\b(true)\b" #color brightred "\b(false)\b" "http\:\/\/.*$" #color brightmagenta "[0-9](\\.|[^\"])*)" ## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting syntax "JavaScript" "\.(js)$" ## Default color white "^.+$" ## Decimal, cotal and hexadecimal numbers color yellow "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b" ## Floating point number with at least one digit before decimal point color yellow "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" color yellow "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" ## Keywords color green "\b(break|case|catch|continue|default|delete|do|else|finally)\b" color green "\b(for|function|if|in|instanceof|new|null|return|switch)\b" color green "\b(switch|this|throw|try|typeof|undefined|var|void|while|with)\b" ## Type specifiers color red "\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\b" color red "\b(Number|Object|RegExp|String)\b" color red "\b(true|false)\b" ## String color brightyellow "L?\"(\\"|[^"])*\"" color brightyellow "L?'(\'|[^'])*'" ## Escapes color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" ## Comments color brightblue (s) "/\*.*?\*/" color brightblue "//.*$"