1
Vote

xml:space="preserve" attribute is not honored

description

When beautifying XAML files that specify the xml:space="preserve", Xaml Markup Styler changes the spacing. It also replaces newline and carriage return characters (
 and 
) by putting the following text on the next line.

For example:
    <system:String x:Key="MediumErrorHIPROFix" xml:space="preserve">Try the following:&#x0d;&#x0a;- Disconnect and reconnect the HI-PRO.&#x0d;&#x0a;- Unplug the HI-PRO from the electricity, and plug in again.&#x0d;&#x0a;- Edit WINDOWS\HIPRO.INI as follows:&#x0d;&#x0a;    if ComPort=COM1, change to ComPort=COM2. Restart Genie.</system:String>
becomes:
    <system:String x:Key="MediumErrorHIPROFix" xml:space="preserve">
        Try the following:
        - Disconnect and reconnect the HI-PRO.
        - Unplug the HI-PRO from the electricity, and plug in again.
        - Edit WINDOWS\HIPRO.INI as follows:
        if ComPort=COM1, change to ComPort=COM2. Restart Genie.
    </system:String>
While this looks better in the XAML, it displays differently on the control, since now additional spaces have been added to the text. Also, the extra spaces before the "if" on the last line have been lost.

comments