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 = {
|
patterns = {
|
||||||
{
|
{
|
||||||
pattern = {
|
pattern = {
|
||||||
"<%s*[sS][cC][rR][iI][pP][tT]%s+[tT][yY][pP][eE]%s*=%s*" ..
|
"<%s*[sS][cC][rR][iI][pP][tT]%f[%s>].->",
|
||||||
"['\"]%a+/[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]['\"]%s*>",
|
"<%s*/%s*[sS][cC][rR][iI][pP][tT]%s*>"
|
||||||
"<%s*/[sS][cC][rR][iI][pP][tT]>"
|
|
||||||
},
|
},
|
||||||
syntax = ".js",
|
syntax = ".js",
|
||||||
type = "function"
|
type = "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern = {
|
pattern = {
|
||||||
"<%s*[sS][cC][rR][iI][pP][tT]%s*>",
|
"<%s*[sS][tT][yY][lL][eE]%f[%s>].->",
|
||||||
"<%s*/%s*[sS][cC][rR][iI][pP][tT]>"
|
|
||||||
},
|
|
||||||
syntax = ".js",
|
|
||||||
type = "function"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern = {
|
|
||||||
"<%s*[sS][tT][yY][lL][eE][^>]*>",
|
|
||||||
"<%s*/%s*[sS][tT][yY][lL][eE]%s*>"
|
"<%s*/%s*[sS][tT][yY][lL][eE]%s*>"
|
||||||
},
|
},
|
||||||
syntax = ".css",
|
syntax = ".css",
|
||||||
|
|
Loading…
Reference in New Issue