Skip to content

[Formatter] Add possibility add empty lines between tags #821

Open
@AndreyMiloserdov

Description

@AndreyMiloserdov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions