plugin-xml icon indicating copy to clipboard operation
plugin-xml copied to clipboard

[Formatter] Add possibility add empty lines between tags

Open AndreyMiloserdov opened this issue 1 year ago • 0 comments

In XSLT, it is common to put empty lines between tags:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output method="html" indent="yes"/>

    <xsl:template match="/">
        Article - <xsl:value-of select="/Article/Title"/>
        Authors: <xsl:apply-templates select="/Article/Authors/Author"/>
    </xsl:template>

    <xsl:template match="Author">
        -  <xsl:value-of select="." />
    </xsl:template>

</xsl:stylesheet>

But at this moment all old files collapse empty lines

Suggest to add new option like a

xmlEmptyLineBetweenTags: true,
xmlEmptyLineBetweenTags: { exceptBounds: true }, // no empty line at the start and end of parent tag

AndreyMiloserdov avatar Oct 09 '24 10:10 AndreyMiloserdov