Description
When an XML file has a comment after an element on the same line, the formatter adds tabs before the comment.
Repro:
Set editorconfig to use tabs for indenting.
Create an XML file with the “before formatting” content below.
Format.
Notice that it results in the “after formatting” content, which has 2 tabs before the comment. It appears that the formatter is applying the 2 tabs necessary for a line indent at this level to an in-line comment case. It’s good that the comment is being kept on the same line, but the tabs should not be inserted.
Description When an XML file has a comment after an element on the same line, the formatter adds tabs before the comment.
Repro:
Notice that it results in the “after formatting” content, which has 2 tabs before the comment. It appears that the formatter is applying the 2 tabs necessary for a line indent at this level to an in-line comment case. It’s good that the comment is being kept on the same line, but the tabs should not be inserted.
Screenshots Before formatting:
After formatting:
Extension Version 2.5.1
VS Code Version 1.89.1
Operating System macOS 14.4.1