-
-
Notifications
You must be signed in to change notification settings - Fork 41
Processing instructions disrupt formatting #762
Copy link
Copy link
Closed
Description
Hi, I've encountered an issue with the plugin where processing instructions within XML files disrupt formatting.
Input (test.xml)
<list><value id="all"><label>All</label></value><value id="one-one"><?group one?><label>One</label></value><value id="one-two"><?group one?><label>Two</label></value><value id="two-one"><?group two?><label>One</label></value><value id="two-two"><?group two?><label>Two</label></value></list>Command:
npx prettier --plugin=@prettier/plugin-xml --tab-width 4 --xml-whitespace-sensitivity "ignore" --print-width 180 test.xmlOutput:
<list>
<value id="all">
<label>All</label>
</value>
<value id="one-one">
<?group one?><label>One</label></value><value id="one-two"><?group one?><label>Two</label></value><value id="two-one"><?group two?><label>One</label></value><value id="two-two"><?group two?>
<label>Two</label>
</value>
</list>Expected output:
<list>
<value id="all">
<label>All</label>
</value>
<value id="one-one">
<?group one?>
<label>One</label>
</value>
<value id="one-two">
<?group one?>
<label>Two</label>
</value>
<value id="two-one">
<?group two?>
<label>One</label>
</value>
<value id="two-two">
<?group two?>
<label>Two</label>
</value>
</list>Any suggestions or fixes would be appreciated. Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels