Improve php string highlighting

Fixes #1753
This commit is contained in:
Zachary Yedidia 2020-07-01 23:38:47 -04:00
parent 2c4035aa65
commit 977290d77b
2 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

View file

@ -12,7 +12,6 @@ rules:
- special: "&[^;[[:space:]]]*;"
- symbol: "[:=]"
- identifier: "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
- constant.string: "\"[^\"]*\""
- constant.number: "(?i)#[0-9A-F]{6,6}"
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
- comment: "<!--.+?-->"
@ -33,8 +32,12 @@ rules:
- symbol.operator: "(=>|===|!==|==|!=|&&|\\|\\||::|=|->|\\!)"
- identifier.var: "(\\$[a-zA-Z0-9\\-_]+)"
- symbol.operator: "[\\(|\\)|/|+|\\-|\\*|\\[|.|,|;]"
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
- symbol.brackets: "(\\[|\\]|\\{|\\}|[()])"
- comment: "(^|[[:space:]])//.*"
- comment: "(^|[[:space:]])#.*"