Replace "constant.string.url" to reduce complexities

This commit is contained in:
2025-06-15 14:48:47 -04:00
parent 6fa81cf80a
commit fb66728b59
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ rules:
end: "<"
rules: []
- symbol: "<|>"
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
# constant.number is used in place of constant.string.url to reduce complexity
- constant.number: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
- comment: "<!--.+?-->"
- preproc: "<!DOCTYPE.+?>"`)
}}
+2 -1
View File
@@ -17,7 +17,8 @@ rules:
- 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)://[^ ]+"
# constant.number is used in place of constant.string.url to reduce complexity
- constant.number: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
- comment: "<!--.+?-->"
- default: "<\\?(php|=)\" end=\"\\?>"
- identifier.macro: "([a-zA-Z0-9_-]+)\\("