This commit is contained in:
Martin Aeschlimann
2018-05-02 17:17:50 +02:00
parent 32d4b53cff
commit 505c9392d5

View File

@@ -112,4 +112,53 @@ suite('HTML Embedded Formatting', () => {
assertFormat('<script src="/js/main.js"> </script>', '<script src="/js/main.js"> </script>');
});
test('bug 48049', function (): any {
assertFormat(
[
'<html>',
'<head>',
'</head>',
'',
'<body>',
'',
' <script>',
' function f(x) {}',
' f(function () {',
' // ',
'',
' console.log(" vsc crashes on formatting")',
' });',
' </script>',
'',
'',
'',
' </body>',
'',
'</html>'
].join('\n'),
[
'<html>',
'',
'<head>',
'</head>',
'',
'<body>',
'',
' <script>',
' function f(x) {}',
' f(function () {',
' // ',
'',
' console.log(" vsc crashes on formatting")',
' });',
' </script>',
'',
'',
'',
'</body>',
'',
'</html>'
].join('\n')
);
});
});