diff --git a/syntax/stxHtml5.go b/syntax/stxHtml5.go index be05eeb..330f58e 100644 --- a/syntax/stxHtml5.go +++ b/syntax/stxHtml5.go @@ -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: ""`) }} diff --git a/syntax/stxPhp.go b/syntax/stxPhp.go index ad37695..f4a2b2e 100644 --- a/syntax/stxPhp.go +++ b/syntax/stxPhp.go @@ -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_-]+)\\("