Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twig endif tag removed #121

Open
eytienne opened this issue May 10, 2019 · 1 comment
Open

Twig endif tag removed #121

eytienne opened this issue May 10, 2019 · 1 comment

Comments

@eytienne
Copy link

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"
	}
}
@stevenzeck stevenzeck transferred this issue from Unibeautify/unibeautify May 10, 2019
@stevenzeck
Copy link
Contributor

Really need to update everything to use latest version of prettydiff, not prettydiff2 anymore. #114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants