Xavalon / XamlStyler

Visual Studio extension to help format your XAML source code
Apache License 2.0
1.18k stars 128 forks source link

Extra blank lines being added to ResourceDictionary xaml #366

Open tenwa opened 2 years ago

tenwa commented 2 years ago

Extry time I format my ResourceDictionary xaml, every time there is a blank line between two keys, and extra blank line gets added.

I have the following in my xaml file

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:system="clr-namespace:System;assembly=mscorlib"
  xml:space="preserve">

  <!--  1  -->
  <system:String x:Key="Language.SingleLine.1_hour">1 hour</system:String>

  <!--  2  -->
  <system:String x:Key="Language.SingleLine.3_hour">3 hour</system:String>
</ResourceDictionary>

When i format it turns into

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:system="clr-namespace:System;assembly=mscorlib"
  xml:space="preserve">

  <!--  1  -->
  <system:String x:Key="Language.SingleLine.1_hour">1 hour</system:String>

  <!--  2  -->
  <system:String x:Key="Language.SingleLine.3_hour">3 hour</system:String>
</ResourceDictionary>

Note extra blank lines added, it does not seem to do this in other xaml files, just the resource file.

Version Info (please complete the following information):