Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
18bab626
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
18bab626
编写于
12月 20, 2019
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[html] issues caused by HTML grammar associating '<' with JS. Fixes #86998
上级
c97c457d
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
1072 addition
and
18 deletion
+1072
-18
extensions/html/build/update-grammar.js
extensions/html/build/update-grammar.js
+44
-0
extensions/html/package.json
extensions/html/package.json
+1
-1
extensions/html/syntaxes/html.tmLanguage.json
extensions/html/syntaxes/html.tmLanguage.json
+6
-6
extensions/html/test/colorize-fixtures/test-embedding.html
extensions/html/test/colorize-fixtures/test-embedding.html
+6
-0
extensions/html/test/colorize-results/12750_html.json
extensions/html/test/colorize-results/12750_html.json
+2
-2
extensions/html/test/colorize-results/25920_html.json
extensions/html/test/colorize-results/25920_html.json
+1
-1
extensions/html/test/colorize-results/test-embedding_html.json
...sions/html/test/colorize-results/test-embedding_html.json
+1003
-0
extensions/html/test/colorize-results/test_html.json
extensions/html/test/colorize-results/test_html.json
+5
-5
extensions/markdown-basics/test/colorize-results/test_md.json
...nsions/markdown-basics/test/colorize-results/test_md.json
+1
-1
extensions/php/test/colorize-results/issue-28354_php.json
extensions/php/test/colorize-results/issue-28354_php.json
+3
-2
未找到文件。
extensions/html/build/update-grammar.js
0 → 100644
浏览文件 @
18bab626
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
'
use strict
'
;
var
updateGrammar
=
require
(
'
../../../build/npm/update-grammar
'
);
function
patchGrammar
(
grammar
)
{
let
patchCount
=
0
;
let
visit
=
function
(
rule
,
parent
)
{
if
(
rule
.
name
===
'
source.js
'
||
rule
.
name
===
'
source.css
'
)
{
if
(
parent
.
parent
&&
parent
.
parent
.
property
===
'
endCaptures
'
)
{
rule
.
name
=
rule
.
name
+
'
-ignored-vscode
'
;
patchCount
++
;
}
}
for
(
let
property
in
rule
)
{
let
value
=
rule
[
property
];
if
(
typeof
value
===
'
object
'
)
{
visit
(
value
,
{
node
:
rule
,
property
:
property
,
parent
:
parent
});
}
}
};
let
repository
=
grammar
.
repository
;
for
(
let
key
in
repository
)
{
visit
(
repository
[
key
],
{
node
:
repository
,
property
:
key
,
parent
:
undefined
});
}
if
(
patchCount
!==
6
)
{
console
.
warn
(
`Expected to patch 6 occurrences of source.js & source.css: Was
${
patchCount
}
`
);
}
return
grammar
;
}
const
tsGrammarRepo
=
'
textmate/html.tmbundle
'
;
const
grammarPath
=
'
Syntaxes/HTML.plist
'
;
updateGrammar
.
update
(
tsGrammarRepo
,
grammarPath
,
'
./syntaxes/html.tmLanguage.json
'
,
grammar
=>
patchGrammar
(
grammar
));
extensions/html/package.json
浏览文件 @
18bab626
...
...
@@ -9,7 +9,7 @@
"vscode"
:
"0.10.x"
},
"scripts"
:
{
"update-grammar"
:
"node .
./../build/npm/update-grammar.js textmate/html.tmbundle Syntaxes/HTML.plist ./syntaxes/html.tmLanguage.json Syntaxes/HTML%20%28Derivative%29.tmLanguage ./syntaxes/html-derivative.tmLanguage.json
"
"update-grammar"
:
"node .
/build/update-grammar.js
"
},
"contributes"
:
{
"languages"
:
[
...
...
extensions/html/syntaxes/html.tmLanguage.json
浏览文件 @
18bab626
...
...
@@ -108,7 +108,7 @@
"name"
:
"punctuation.definition.string.end.html"
},
"1"
:
{
"name"
:
"source.css"
"name"
:
"source.css
-ignored-vscode
"
}
},
"name"
:
"string.quoted.double.html"
,
...
...
@@ -132,7 +132,7 @@
"name"
:
"punctuation.definition.string.end.html"
},
"1"
:
{
"name"
:
"source.css"
"name"
:
"source.css
-ignored-vscode
"
}
},
"name"
:
"string.quoted.single.html"
,
...
...
@@ -207,7 +207,7 @@
"name"
:
"punctuation.definition.string.end.html"
},
"1"
:
{
"name"
:
"source.js"
"name"
:
"source.js
-ignored-vscode
"
}
},
"name"
:
"string.quoted.double.html"
,
...
...
@@ -265,7 +265,7 @@
"name"
:
"punctuation.definition.string.end.html"
},
"1"
:
{
"name"
:
"source.js"
"name"
:
"source.js
-ignored-vscode
"
}
},
"name"
:
"string.quoted.single.html"
,
...
...
@@ -1785,7 +1785,7 @@
"name"
:
"punctuation.definition.tag.begin.html"
},
"2"
:
{
"name"
:
"source.css"
"name"
:
"source.css
-ignored-vscode
"
},
"3"
:
{
"name"
:
"entity.name.tag.html"
...
...
@@ -1892,7 +1892,7 @@
"name"
:
"punctuation.definition.tag.begin.html"
},
"2"
:
{
"name"
:
"source.js"
"name"
:
"source.js
-ignored-vscode
"
}
},
"patterns"
:
[
...
...
extensions/html/test/colorize-fixtures/test-embedding.html
0 → 100644
浏览文件 @
18bab626
<script>
console
.
log
(
'
x
'
)
</script>
<style>test
{
display
:
none
}
</style>
<a
onblur=
"doBlur()"
onclick=
'doClick()'
ondrag=
doDrag()
></a>
<div
style=
"x { }"
></div>
<div
style=
'y { }'
></div>
<div
style=
z{}
></div>
extensions/html/test/colorize-results/12750_html.json
浏览文件 @
18bab626
...
...
@@ -210,7 +210,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
@@ -397,7 +397,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
extensions/html/test/colorize-results/25920_html.json
浏览文件 @
18bab626
...
...
@@ -518,7 +518,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
extensions/html/test/colorize-results/test-embedding_html.json
0 → 100644
浏览文件 @
18bab626
此差异已折叠。
点击以展开。
extensions/html/test/colorize-results/test_html.json
浏览文件 @
18bab626
...
...
@@ -782,7 +782,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.style.end.html punctuation.definition.tag.begin.html source.css"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.style.end.html punctuation.definition.tag.begin.html source.css
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
@@ -1200,7 +1200,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
@@ -1354,7 +1354,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
@@ -2212,7 +2212,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
@@ -3189,4 +3189,4 @@
"hc_black"
:
"punctuation.definition.tag: #808080"
}
}
]
]
\ No newline at end of file
extensions/markdown-basics/test/colorize-results/test_md.json
浏览文件 @
18bab626
...
...
@@ -1134,7 +1134,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.markdown meta.embedded.block.html meta.tag.metadata.style.end.html punctuation.definition.tag.begin.html source.css"
,
"t"
:
"text.html.markdown meta.embedded.block.html meta.tag.metadata.style.end.html punctuation.definition.tag.begin.html source.css
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
extensions/php/test/colorize-results/issue-28354_php.json
浏览文件 @
18bab626
[{
[
{
"c"
:
"<"
,
"t"
:
"text.html.php meta.embedded.block.html meta.tag.metadata.script.start.html punctuation.definition.tag.begin.html"
,
"r"
:
{
...
...
@@ -495,7 +496,7 @@
},
{
"c"
:
"<"
,
"t"
:
"text.html.php meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js"
,
"t"
:
"text.html.php meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js
-ignored-vscode
"
,
"r"
:
{
"dark_plus"
:
"punctuation.definition.tag: #808080"
,
"light_plus"
:
"punctuation.definition.tag: #800000"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录