language_html: Improve subsyntax highlighting (#1043)
* language_html: Improve subsyntax highlighting - Adjusted `<script>`/`<style>` tag detection to not break when attributes like `defer` are added
This commit is contained in:
parent
880e6e4f0f
commit
beefb16469
|
@ -8,24 +8,15 @@ syntax.add {
|
|||
patterns = {
|
||||
{
|
||||
pattern = {
|
||||
"<%s*[sS][cC][rR][iI][pP][tT]%s+[tT][yY][pP][eE]%s*=%s*" ..
|
||||
"['\"]%a+/[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]['\"]%s*>",
|
||||
"<%s*/[sS][cC][rR][iI][pP][tT]>"
|
||||
"<%s*[sS][cC][rR][iI][pP][tT]%f[%s>].->",
|
||||
"<%s*/%s*[sS][cC][rR][iI][pP][tT]%s*>"
|
||||
},
|
||||
syntax = ".js",
|
||||
type = "function"
|
||||
},
|
||||
{
|
||||
pattern = {
|
||||
"<%s*[sS][cC][rR][iI][pP][tT]%s*>",
|
||||
"<%s*/%s*[sS][cC][rR][iI][pP][tT]>"
|
||||
},
|
||||
syntax = ".js",
|
||||
type = "function"
|
||||
},
|
||||
{
|
||||
pattern = {
|
||||
"<%s*[sS][tT][yY][lL][eE][^>]*>",
|
||||
"<%s*[sS][tT][yY][lL][eE]%f[%s>].->",
|
||||
"<%s*/%s*[sS][tT][yY][lL][eE]%s*>"
|
||||
},
|
||||
syntax = ".css",
|
||||
|
|
Loading…
Reference in New Issue