Skip to content

Twig endif tag removed #121

@eytienne

Description

@eytienne

Describe the bug
The endif tag is removed by the formater when i press ctrl + shift + i to format on vs code.

To Reproduce
Steps to reproduce the behavior:
make a twig or html (configured as twig file) and put this in:

<a class="nav-link" {% if m.href is defined %} href="{{ m.href }}" {% endif %} {% if m.id is defined %} id="{{m.id}}" {% endif %}>
	<i class="fa fa-icon"></i>
	<p>{{ m.label }}</p>
</a> 

Expected behavior
to not make anything

Actual

<a class="nav-link" {% if m.href is defined %} href="{{ m.href }}" {% endif %} {% if m.id is defined %} id="{{m.id}}">
	<i class="fa fa-icon"></i>
	<p>{{ m.label }}</p>
</a>

Error/Stack Traces
it just removes the second endif tag

System (please complete the following information):

  • OS: Ubuntu
  • Version: 18.04.2 LTS

Additional context
.unibeautifyrc.json config file:

{
	"HTML": {
		"indent_size": 1,
		"indent_style": "tab"
	}
}

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