mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
Revert "[html] A 'return' statement can only be used within a function body. Fixes #143220"
This reverts commit 56661ec16a
.
This commit is contained in:
parent
ac39fefe78
commit
c7a685113b
|
@ -181,7 +181,6 @@ function getPrefix(c: EmbeddedRegion) {
|
|||
if (c.attributeValue) {
|
||||
switch (c.languageId) {
|
||||
case 'css': return CSS_STYLE_RULE + '{';
|
||||
case 'javascript': return '()=>{';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
|
@ -190,7 +189,7 @@ function getSuffix(c: EmbeddedRegion) {
|
|||
if (c.attributeValue) {
|
||||
switch (c.languageId) {
|
||||
case 'css': return '}';
|
||||
case 'javascript': return '};';
|
||||
case 'javascript': return ';';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
|
|
|
@ -120,7 +120,7 @@ suite('HTML Embedded Support', () => {
|
|||
assertEmbeddedLanguageContent('<html><script>var i = 0;</script></html>', 'javascript', ' var i = 0; ');
|
||||
assertEmbeddedLanguageContent('<script type="text/javascript">var i = 0;</script>', 'javascript', ' var i = 0; ');
|
||||
|
||||
assertEmbeddedLanguageContent('<div onKeyUp="foo()" onkeydown="bar()"/>', 'javascript', ' ()=>{foo()}; ()=>{bar()}; ');
|
||||
assertEmbeddedLanguageContent('<div onKeyUp="foo()" onkeydown="bar()"/>', 'javascript', ' foo(); bar(); ');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue