vscode-xml: Formatting breaks attributes containing quotes
How to reproduce:
- Use this document:
<hello attr='"' />
- Run the “Format document” command, with
xml.format.quotations
set todoubleQuotes
(the default)
Symptoms:
The formatting produces the following invalid XML: <hello attr=""" />
Expected: Formatting shouldn’t change the type of quote used for an attribute if that produces invalid XML, that is if the attribute value contains the quote character.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 19 (8 by maintainers)
@keccs you can now set
"xml.format.enforceQuoteStyle"="ignore"
@brianary can you please provide an example of such config file?
I agree with you, but I think it’s not a commons usecase.