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
Currently the experimental formatter will normalize the space before and after the entire text content by default. Here is the current behavior:
Before formatting:
<a>
Content
<b>
Content2
Content3
</b>
</a>
After formatting:
<a> Content <b> Content2
Content3
</b>
</a>
For reference, in IJ, if there is an line break in the text, the text will be indented. If there is no line break, it will remove the spaces between the text and element tag. Before formatting:
<a> Content test
<b>
Content2
Content3
</b>
</a>
After formatting:
<a>Content test
<b>
Content2
Content3
</b>
</a>
There is an option in IJ to keep line breaks in text (true by default), when this is set to false, the content lines are joined. (note that it will not snap the text content to the same line as the 'b' tag if there is a line break present) After formatting with keep line breaks in text set to false:
<a>Content
<b>
Content2 Content3
</b>
</a>
Referencing the way it works IJ, my suggestions are to:
mimic how the text content formatting is done by default in the same way as IJ where it will respect any existing line breaks and indent the text if needed. It will also normalize the spaces between text in the same line.
keep the joinContentLines setting but change it so that it will keep the new line between the element tag and text if there exists one.
The text was updated successfully, but these errors were encountered:
JessicaJHee
changed the title
Have xml.format.joinContentLines to true as default behavior in experimental formatter
Improve text content formatting in experimental formatter
Oct 13, 2022
Currently the experimental formatter will normalize the space before and after the entire text content by default. Here is the current behavior:
Before formatting:
After formatting:
For reference, in IJ, if there is an line break in the text, the text will be indented. If there is no line break, it will remove the spaces between the text and element tag.
Before formatting:
After formatting:
There is an option in IJ to
keep line breaks in text
(true by default), when this is set to false, the content lines are joined. (note that it will not snap the text content to the same line as the 'b' tag if there is a line break present)After formatting with
keep line breaks in text
set to false:Referencing the way it works IJ, my suggestions are to:
The text was updated successfully, but these errors were encountered: