)) %}
                                    <li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
                                        {% if h2.children and toc_levels > 2 %}
                                            <ul>
                                                {% for h3 in h2.children %}
                                                    {% if not toc_ignore_pattern or not (h3.title is matching(toc_ignore_pattern)) %}
                                                        <li><a href="{{ 