syntax: javascript: require that a comment is preceded by whitespace

Either by whitespace or by the start of a line.

This avoids treating part of a URL as a comment.
master
Benno Schulenberg 2017-12-25 15:25:04 +01:00
parent 8e0a7ec20d
commit ab62d28817
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\
# Strings.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`"
# Comments.
color brightblue "//.*"
color brightblue "(^|[[:space:]])//.*"
color brightblue start="/\*" end="\*/"
# Trailing whitespace.