Closed Jay-o-Way closed 8 months ago
Please take a look at this section of the wiki on how we handle whitespace. There is this concept of "significant whitespace" in XAML that we need to maintain when formatting. If you are mixing inline-level flow content elements with other text (as in your example), you will want to specify xml:space="preserve" to preserve whitespace properly.
You're right, that does the trick! Thanks! Please add a few words to the wiki text that this means to add the attribution to the XAML element and that it's not a setting for XamlStyler.
Besides that - Note that
newlines will not be added to \
if it is immediately followed by another element
is different then actively removing spaces.
Glad that worked! The note on runs is specifically about back-to-back run elements. Anything more than that, and you should really use xml:space="preserve"
to preserve intended whitespace. Updated wiki text to help clarify:
Please note that if you are mixing inline-level flow content elements with other text, you may need to specify xml:space="preserve" on the parent element in XAML to preserve whitespace properly.
Describe the bug When having some text-related elements in a paragraph, the spaces and newlines before and after the elements are changed in a bad way.
To Reproduce Steps to reproduce the behavior:
Expected behavior
.
or comma,
, then there must be no space inserted. If this does happen, an unwanted and incorrect [space] is visible in the UI .Screenshots
External Configuration
Version Info (please complete the following information):
Additional context I believe Visual Studio also has a habit of messing with these spaces and/or newlines. Might wanna reach out to that team, if possible?