Open gareth-rees opened 12 years ago
Thoughts:
I can't recreate this issue when I paste your example into a new template.
I end up with all three lines without an indent - running from the latest Pony Mode master, Emacs 23.
e.g.
<img>
{% block foo %}{% endblock %}
<img>
Which is the "Right Thing" AFAIC
I added a test for this - if you run
$ rake test
... from the root of the repo on a local checkout you should see four passing tests
Open the following template in
pony-tpl-mode
:and indent the whole file (
C-x h C-M-\
). The result is as follows:with the second
<img>
incorrectly indented. This is becausepony-calculate-indent-backward
recognizes that the{% block foo %}
starts an indented block but does not recognize that the{% endblock %}
closes that block.The indentation calculation needs to look at all tags on a line, not just the first tag.