r }}{{ subMenuClass }}>{% endcapture %}
        {% elsif currLevel < lastLevel %}
            {% assign repeatCount = lastLevel | minus: currLevel %}

            {% for i in (1..repeatCount) %}
                {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
            {% endfor %}

            {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
        {% else %}
            {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
        {% endif %}

    