djula icon indicating copy to clipboard operation
djula copied to clipboard

Maintain indentation

Open kanubacode opened this issue 8 years ago • 0 comments

I would be very nice if block inheritence maintained the indentation level and newlines. For example:

{# base.html #}
<html lang="en">
  <head>
  </head>
  <body>
    <div>
      <div>
        <div>
          <div>
            {% block content %}{% endblock content %}
          </div>
        </div>
      </div>
    </div>
  </body>
</html>
{# child.html #}
{% extends "base.html" %}
{% block content %}
<p>Some text</p>
{% endblock content %}

should be rendered as:

<html lang="en">
  <head>
  </head>
  <body>
    <div>
      <div>
        <div>
          <div>
            <p>Some text</p>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

and NOT as:

<html lang="en">
  <head>
  </head>
  <body>
    <div>
      <div>
        <div>
          <div>

<p>Some text</p>

          </div>
        </div>
      </div>
    </div>
  </body>
</html>

kanubacode avatar Jan 26 '17 23:01 kanubacode