{% comment %}
    Template for each level of the interpretation tree
{% endcomment %}
<section {% if not inline %}id="{{interp.markup_id}}"{% endif %} data-permalink-section>
    {% if inline %}
        <h5> {{ interp.header|safe }}</h5>
    {% elif interp.section_header %}
        <h3 tabindex="0"> {{ interp.header|safe }}</h3>
    {% else %}
        <h4 class='interp-subheading' tabindex="0"> {{ interp.header_markup|safe }} </h4>
    {% endif %}

    {%if interp.marked_up %}
        <p> 
        {{interp.marked_up|safe}}
        </p>
    {% endif %}

    {% if interp.par_children %}
        <ol class="level-{{interp.list_level|add:1}}">
            {% for par_child in interp.par_children %}
                {% with node=par_child %}
                    {% include node.template_name %}
                {% endwith %}
            {% endfor %}
        </ol>
    {% endif %}

    {% if not inline and interp.header_children %}
        {% for header_child in interp.header_children %}
            {% with interp=header_child template_name="regulations/interp-tree.html" %}
                {% include template_name %}
            {% endwith %}
        {% endfor %}
    {% endif %}
</section>
