Merge pull request #193 from alexherbo2/javascript-rc

javascript.kak: highlight comments
This commit is contained in:
Maxime Coste 2014-07-10 19:15:51 +01:00
commit d157ba06cf

View File

@ -15,8 +15,9 @@ hook global BufCreate .*[.](js) %{
addhl -group / multi_region -default code javascript \
double_string '"' (?<!\\)(\\\\)*" '' \
single_string "'" "'" '' \
regex '/' (?<!\\)(\\\\)*/[gimy]* '' \
comment '#' '$' ''
comment // '$' '' \
comment /[*] [*]/ '' \
regex / (?<!\\)(\\\\)*/[gimy]* ''
# Regular expression flags are: g → global match, i → ignore case, m → multi-lines, y → sticky
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp