plugin-xml
plugin-xml copied to clipboard
Feature Request: smart quote styles
Could we have an option like "xmlQuoteAttributes": "least_escape" that auto-detects the best quote style for the attribute based on how many of each quotation character is found in the value?
That way we can use quotation marks in values and still have it be readable.
bracketSameLine
None
printWidth
120
singleAttributePerLine
false
tabWidth
2
xmlWhitespaceSensitivity
ignore
xmlSelfClosingSpace
true
Input XML
<div class='row'>
<div class='col-1' />
<div class='col-9 ps-4' t-field='o.partner_id.name' />
<div class='col-2' t-out="f'{o.amount:.2f}'" />
</div>
Current output XML
<div class='row'>
<div class='col-1' />
<div class='col-9 ps-4' t-field='o.partner_id.name' />
<div class='col-2' t-out='f'{o.amount:.2f}'' />
</div>
~~Expected~~ Desired output XML
<div class='row'>
<div class='col-1' />
<div class='col-9 ps-4' t-field='o.partner_id.name' />
<div class='col-2' t-out="f'{o.amount:.2f}'" />
</div>