diff --git a/_includes/toc.html b/_includes/toc.html index 73d42ee..0c65a9b 100644 --- a/_includes/toc.html +++ b/_includes/toc.html @@ -67,12 +67,6 @@ {% continue %} {% endif %} - {% if skipNoIDs == true %} - {% unless node contains "id=" %} - {% continue %} - {% endunless %} - {% endif %} - {% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %} {% if headerLevel < minHeader or headerLevel > maxHeader %} @@ -116,6 +110,8 @@ {% if html_id %} {% capture list_item %}[{{ anchor_body }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% endcapture %} + {% elsif skipNoIDs == true %} + {% continue %} {% else %} {% capture list_item %}{{ anchor_body }}{% endcapture %} {% endif %} diff --git a/_tests/skipHeadingsWithNoIDs.md b/_tests/skipHeadingsWithNoIDs.md index 7084c80..e90cd7f 100644 --- a/_tests/skipHeadingsWithNoIDs.md +++ b/_tests/skipHeadingsWithNoIDs.md @@ -8,6 +8,7 @@

My Awesome Example Page

With an awesome subtitle

+ Dummy Link
### Known Problems