- skip headers that do not have an `id` attribute

        Output:
            An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
            generate the table of contents and will NOT output the markdown given to it
    {% endcomment %}

    {% capture newline %}
    {% endcapture %}
    {% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->

    {% capture deprecation_warnings %}{% endcapture %}

    {% i