提交 520fb134 编写于 作者: M Martin Aeschlimann

[html] errors in attributes on missing semicolons and parens. Fixes #15970

上级 0a60061c
......@@ -225,7 +225,7 @@ function append(result: string, str: string, n: number): string {
}
function getAttributeLanguage(attributeName: string): string {
let match = attributeName.match(/^(style)|(on\w+)$/i);
let match = attributeName.match(/^(style)$|^(on\w+)$/i);
if (!match) {
return null;
}
......
......@@ -106,6 +106,9 @@ suite('HTML Embedded Support', () => {
assertLanguageId('<DIV ONKEYUP=foo(|)</DIV>', 'javascript');
assertLanguageId('<DIV ONKEYUP=foo()|</DIV>', 'javascript');
assertLanguageId('<DIV ONKEYUP=foo()<|/DIV>', 'html');
assertLanguageId('<label data-content="|Checkbox"/>', 'html');
assertLanguageId('<label on="|Checkbox"/>', 'html');
});
test('Script content', function (): any {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册