HTML format selection formatting entire line issue. Fixes #25521

This commit is contained in:
Martin Aeschlimann
2017-04-28 09:58:23 +02:00
parent 2a202d165a
commit a6db6bb440
3 changed files with 23 additions and 2 deletions

View File

@@ -103,6 +103,10 @@ suite('HTML Embedded Formatting', () => {
assertFormat('<html><head>\n <script>\n|var x=6;\nvar y= 9;|\n</script></head></html>', '<html><head>\n <script>\n var x = 6;\n var y = 9;\n</script></head></html>');
});
test('Range after new line', function (): any {
assertFormat('<html><head>\n |<script>\nvar x=6;\n</script>\n|</head></html>', '<html><head>\n <script>\n var x = 6;\n\n </script>\n</head></html>');
});
});
function applyEdits(document: TextDocument, edits: TextEdit[]): string {