DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
322 stars 86 forks source link

New lines are being added on each reformatting #193

Closed amrtn closed 6 years ago

amrtn commented 6 years ago

Description

Every time I reformat a XSL file (with the Format As XML tool) new blank lines are automatically added to the file. See example:

Original file:

  <xsl:template name="btn-export-excel-pdf">
    <div class="row">
      <div class="col-md button-wrapper text-center">
        <a class="btn btn-outline-info" role="button" href="javascript:template.printToPdf()" target="_blank">
          <i class="far fa-file-pdf">&#160;</i> Export to PDF                                        
        </a>                  &#160;                                                        
        <a class="btn btn-outline-info" role="button" href="javascript:template.exportToExcel()" target="_blank">
          <i class="far fa-file-excel">&#160;</i> Export to EXCEL                                        
        </a>
      </div>
    </div>
  </xsl:template>

First reformatting

<xsl:template name="btn-export-excel-pdf">
    <div class="row">
      <div class="col-md button-wrapper text-center">
        <a class="btn btn-outline-info" role="button" href="javascript:template.printToPdf()" target="_blank">
          <i class="far fa-file-pdf">&#160;</i> Export to PDF                                        

        </a>                  &#160;                                                        
                <a class="btn btn-outline-info" role="button" href="javascript:template.exportToExcel()" target="_blank">
          <i class="far fa-file-excel">&#160;</i> Export to EXCEL                                        

        </a>
      </div>
    </div>
  </xsl:template>
  <xsl:template name="btn-export-excel-pdf">
    <div class="row">
      <div class="col-md button-wrapper text-center">
        <a class="btn btn-outline-info" role="button" href="javascript:template.printToPdf()" target="_blank">
          <i class="far fa-file-pdf">&#160;</i> Export to PDF                                        

        </a>                  &#160;                                                        
                        <a class="btn btn-outline-info" role="button" href="javascript:template.exportToExcel()" target="_blank">
          <i class="far fa-file-excel">&#160;</i> Export to EXCEL                                        

        </a>
      </div>
    </div>
  </xsl:template>

Formatter Implementation

"xmlTools.xmlFormatterImplementation": "v2",

XML Tools Version

2.2.0

VS Code Version

1.24.0

Operating System

Windows 10