]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/php.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / php.yaml
index c6862788de8ddc67e4643f90fac02d53bd041dd5..82fd443a6981d7a9be55e421148dab81113c2b50 100644 (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:]])#.*"