From d980884d5944b7f547a27b6f53ff2d90945ab4a8 Mon Sep 17 00:00:00 2001 From: Vladimir Jimenez Date: Mon, 6 Nov 2017 08:27:51 -0800 Subject: [PATCH] Update jekyll-toc with heading classes fix (#1337) --- _includes/toc.html | 12 +++++++----- docs/_includes/toc.html | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/_includes/toc.html b/_includes/toc.html index 78f92cc4..27023f71 100644 --- a/_includes/toc.html +++ b/_includes/toc.html @@ -1,5 +1,7 @@ {% capture tocWorkspace %} {%- comment -%} + Version 1.0.2 + "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe Usage: @@ -44,10 +46,11 @@ {% assign indentAmount = headerLevel | minus: minHeader | add: 1 %} {% assign _workspace = node | split: '{% endcapture %} + {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %} {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} {% assign space = '' %} @@ -69,5 +72,4 @@ {% capture my_toc %}{: #{{ include.id }}} {{ my_toc | lstrip }}{% endcapture %} {% endif %} -{% endcapture %}{% assign tocWorkspace = '' %} -{{ my_toc | markdownify }} \ No newline at end of file +{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }} \ No newline at end of file diff --git a/docs/_includes/toc.html b/docs/_includes/toc.html index 78f92cc4..27023f71 100644 --- a/docs/_includes/toc.html +++ b/docs/_includes/toc.html @@ -1,5 +1,7 @@ {% capture tocWorkspace %} {%- comment -%} + Version 1.0.2 + "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe Usage: @@ -44,10 +46,11 @@ {% assign indentAmount = headerLevel | minus: minHeader | add: 1 %} {% assign _workspace = node | split: '{% endcapture %} + {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %} {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} {% assign space = '' %} @@ -69,5 +72,4 @@ {% capture my_toc %}{: #{{ include.id }}} {{ my_toc | lstrip }}{% endcapture %} {% endif %} -{% endcapture %}{% assign tocWorkspace = '' %} -{{ my_toc | markdownify }} \ No newline at end of file +{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }} \ No newline at end of file