mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Script element with type="text/html" not recognised as html. Fixes #25920
This commit is contained in:
parent
63e81b33ca
commit
4a1c576f48
|
@ -339,7 +339,7 @@
|
|||
},
|
||||
{
|
||||
"begin": "\\G",
|
||||
"end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript))\\b))",
|
||||
"end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript)|module)\\b))",
|
||||
"name": "meta.tag.metadata.script.html",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -347,6 +347,44 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=(?i:type\\s*=\\s*('|\"|)(?=text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html))\\b))",
|
||||
"end": "(<)(?=/(?i:script))",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "meta.tag.metadata.script.html"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"end": "(>)|(?=/>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"name": "meta.tag.metadata.script.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?!\\G)",
|
||||
"end": "(?=</(?i:script))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=(?i:type))",
|
||||
"end": "(<)(?=/(?i:script))",
|
||||
|
|
13
extensions/html/test/colorize-fixtures/25920.html
Normal file
13
extensions/html/test/colorize-fixtures/25920.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<script type='text/html'>
|
||||
<div class='foo'></div>
|
||||
</script>
|
||||
<script type='module'>
|
||||
var x = 9;
|
||||
</script>
|
||||
<script type='text/ng-template'>
|
||||
<div class='foo'></div>
|
||||
</script>
|
||||
<body class='bar'>
|
||||
</body>
|
||||
</html>
|
1014
extensions/html/test/colorize-results/25920_html.json
Normal file
1014
extensions/html/test/colorize-results/25920_html.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue