DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
320 stars 87 forks source link

Incorrect formatting of modifications #338

Open emptyVoid opened 3 years ago

emptyVoid commented 3 years ago

Description

With VSCode setting Format On Save enabled and Format On Save Mode set to modifications the extension incorrectly formats the modified parts of an XML stripping the changed element's indent and adding a new-line after the element.

Formatter Implementation

classic / v2 (both yield incorrect formatting).

XML Tools Version

2.5.1

VS Code Version

Version: 1.51.1 (system setup) Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-10T23:34:32.027Z Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.19042