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
Incorrect indentation of Twig switch statements. #495
Comments
I can reproduce this failure in the latest version of Pretty Diff {% for %}
{% switch block.type %}
{% case "test" %}
<p>asdf</p>
{% default %}
{% endswitch %}
{% endfor %} Out of curiosity do you know what the sudden interest in Pretty Diff's Twig support is all about? I have had almost no feedback about Twig in the nearly 3 years I have provided support and then this week 3 valid defects related to Twig are opened. That and this Github repo has gotten about 20 Github stars this week. |
Hmm. That's strange. I can say for myself that it's because Craft CMS is using Twig for templating. I know Craft is gaining popularity, and a lot of design and developer studios I know of are switching from Wordpress etc. to Craft. But it might be something completely different. |
Hey @prettydiff, is this going to be fixed any time soon? |
Yeah, I use GravCMS and we use TWIG in there also. Currently, use Atom with Beautify and I have issues like this... Also, Gantry 5 Framework is using the twig for Joomla, WordPress and Grav so fixing this would really be good. |
I fixed this today in one of my many commits. |
Hi,
it looks like prettydiff wrongly indents switch statements with Twig templates. Look at example below. Left hand, how it should be indented, right hand is how it actually is:
The text was updated successfully, but these errors were encountered: