Dont take # as comment when preceded by backslash (#2112)

When escaped with a backslash (e.g., inside a regex) the numeral char, ```#```, shouldn't be interpreted as a beginning of comment.
This commit is contained in:
Héctor M. Monacci
2021-06-01 20:33:06 -03:00
committed by GitHub
parent 56c7744e23
commit 2dc2cabe0e

View File

@@ -18,7 +18,7 @@ rules:
- constant.number: "\\b0[bB][01][01_]+\\b"
- constant.number: "\\b[0-9_]((\\.?)[0-9_]+)?[eE][+\\-][0-9][0-9_]+\\b"
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- comment: "[[:space:]]*#.*$"
- comment: "[[:space:]]*[^\\\\]#.*$"
- comment:
start: "\\#\\["
end: "\\]\\#"