mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-27 13:40:25 +00:00
custom 'html' tags are in red color. Fixes #56467
This commit is contained in:
49
extensions/html/syntaxes/html-derivative.tmLanguage.json
Normal file
49
extensions/html/syntaxes/html-derivative.tmLanguage.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"information_for_contributors": [
|
||||
"This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML%20%28Derivative%29.tmLanguage",
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/textmate/html.tmbundle/commit/390c8870273a2ae80244dae6db6ba064a802f407",
|
||||
"name": "HTML (Derivative)",
|
||||
"scopeName": "text.html.derivative",
|
||||
"injections": {
|
||||
"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)": {
|
||||
"comment": "Uses R: to ensure this matches after any other injections.",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "<",
|
||||
"name": "invalid.illegal.bad-angle-bracket.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.basic#core-minus-invalid"
|
||||
},
|
||||
{
|
||||
"begin": "(</?)(\\w[^\\s>]*)(?<!/)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
}
|
||||
},
|
||||
"end": "((?: ?/)?>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"name": "meta.tag.other.unrecognized.html.derivative",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.basic#attribute"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/textmate/html.tmbundle/commit/6a6fb2967e2f562a634fca97d18018104d428f1c",
|
||||
"version": "https://github.com/textmate/html.tmbundle/commit/390c8870273a2ae80244dae6db6ba064a802f407",
|
||||
"name": "HTML",
|
||||
"scopeName": "text.html.basic",
|
||||
"injections": {
|
||||
@@ -20,55 +20,13 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(<\\?)(xml)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
}
|
||||
},
|
||||
"end": "(\\?>)",
|
||||
"name": "meta.tag.metadata.processing.xml.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#attribute"
|
||||
}
|
||||
]
|
||||
"include": "#xml-processing"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "<!(?=(?i:DOCTYPE\\s))",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
}
|
||||
},
|
||||
"end": ">",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"name": "meta.tag.metadata.doctype.html",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\G(?i:DOCTYPE)",
|
||||
"name": "entity.name.tag.html"
|
||||
},
|
||||
{
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"name": "string.quoted.double.html"
|
||||
},
|
||||
{
|
||||
"match": "[^\\s>]+",
|
||||
"name": "entity.other.attribute-name.html"
|
||||
}
|
||||
]
|
||||
"include": "#doctype"
|
||||
},
|
||||
{
|
||||
"include": "#cdata"
|
||||
@@ -468,6 +426,59 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"core-minus-invalid": {
|
||||
"comment": "This should be the root pattern array includes minus #tags-invalid",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#xml-processing"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#doctype"
|
||||
},
|
||||
{
|
||||
"include": "#cdata"
|
||||
},
|
||||
{
|
||||
"include": "#tags-valid"
|
||||
},
|
||||
{
|
||||
"include": "#entities"
|
||||
}
|
||||
]
|
||||
},
|
||||
"doctype": {
|
||||
"begin": "<!(?=(?i:DOCTYPE\\s))",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
}
|
||||
},
|
||||
"end": ">",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"name": "meta.tag.metadata.doctype.html",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\G(?i:DOCTYPE)",
|
||||
"name": "entity.name.tag.html"
|
||||
},
|
||||
{
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"name": "string.quoted.double.html"
|
||||
},
|
||||
{
|
||||
"match": "[^\\s>]+",
|
||||
"name": "entity.other.attribute-name.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"entities": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -2559,6 +2570,24 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xml-processing": {
|
||||
"begin": "(<\\?)(xml)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
}
|
||||
},
|
||||
"end": "(\\?>)",
|
||||
"name": "meta.tag.metadata.processing.xml.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#attribute"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user