You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strings with multiple whitespaces are formatted with single one #1026
I am aware of #1017, and setting "files.trimTrailingWhitespace":false does not solve the problem. All multiple whitespaces are always formatted as single whitespce:
Ok, I see that there is an option where you can specify tag names for which to preserve spaces.
Adding tag <Inner> in my case, does fix the problem.
I think that manually adding tag names to a list is not an viable and scalable way to handle that.
Probably, it would be better to add an option checkbox that sets the default handling for multiple whitespaces: when checked, it should preveserve whitespaces for all tags. And the tagnames list, maybe, should be turned in a blacklist for tags that need whitespaces trimmed.
Also, using the legacy formatter preserves spaces as well.
Activity
luca-domenichini commentedon Sep 27, 2024
Ok, I see that there is an option where you can specify tag names for which to preserve spaces.

Adding tag <Inner> in my case, does fix the problem.
I think that manually adding tag names to a list is not an viable and scalable way to handle that.
Probably, it would be better to add an option checkbox that sets the default handling for multiple whitespaces: when checked, it should preveserve whitespaces for all tags. And the tagnames list, maybe, should be turned in a blacklist for tags that need whitespaces trimmed.
Also, using the legacy formatter preserves spaces as well.
angelozerr commentedon Oct 3, 2026
Fixed with eclipse-lemminx/lemminx#1845
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
Add xml.format.mixedContent and xml.format.inlineElements settings
26 remaining items
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
Add xml.format.mixedContent and xml.format.blockElements settings
angelozerr commentedon Oct 7, 2026
Fixed with eclipse-lemminx/lemminx#1868
See doc at https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatmixedcontent