File tree 5 files changed +71
-3
lines changed
5 files changed +71
-3
lines changed Original file line number Diff line number Diff line change 44
44
{% assign indentAmount = headerLevel | minus: minHeader | add: 1 %}
45
45
{% assign _workspace = node | split: '</ h' %}
46
46
47
- {% assign _idWorkspace = _workspace[0] | split: '"' %}
48
- {% assign html_id = _idWorkspace[1] %}
47
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
48
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
49
+ {% assign html_id = _idWorkspace[0] %}
49
50
50
- {% capture _hAttrToStrip %}{{ headerLevel }} id="{{ html_id }}" > {% endcapture %}
51
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: ' > ' | first }} > {% endcapture %}
51
52
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
52
53
53
54
{% assign space = '' %}
Original file line number Diff line number Diff line change
1
+ ---
2
+ # See https://github.com/allejo/jekyll-toc/issues/4
3
+ ---
4
+
5
+ {% capture markdown %}
6
+ # Miscellaneous features
7
+ {: .hide-from-excerpt}
8
+
9
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit.
10
+ {% endcapture %}
11
+ {% assign text = markdown | markdownify %}
12
+
13
+ {% include toc.html html=text %}
14
+
15
+ <!-- /// -->
16
+
17
+ <ul >
18
+ <li><a href="#miscellaneous-features">Miscellaneous features</a></li>
19
+ </ul >
Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
3
+
4
+ {% capture markdown %}
5
+ # Miscellaneous ** features**
6
+ {: #custom-heading}
7
+ {% endcapture %}
8
+ {% assign text = markdown | markdownify %}
9
+
10
+ {% include toc.html html=text %}
11
+
12
+ <!-- /// -->
13
+
14
+ <ul >
15
+ <li><a href="#custom-heading">Miscellaneous <strong>features</strong></a></li>
16
+ </ul >
Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
3
+
4
+ {% capture markdown %}
5
+ # Miscellaneous ** features**
6
+ {: #custom-heading}
7
+ {% endcapture %}
8
+ {% assign text = markdown | markdownify %}
9
+
10
+ {% include toc.html html=text sanitize=true %}
11
+
12
+ <!-- /// -->
13
+
14
+ <ul >
15
+ <li><a href="#custom-heading">Miscellaneous features</a></li>
16
+ </ul >
Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
3
+
4
+ {% capture markdown %}
5
+ # Miscellaneous features
6
+ {: #custom-heading}
7
+ {% endcapture %}
8
+ {% assign text = markdown | markdownify %}
9
+
10
+ {% include toc.html html=text %}
11
+
12
+ <!-- /// -->
13
+
14
+ <ul >
15
+ <li><a href="#custom-heading">Miscellaneous features</a></li>
16
+ </ul >
You can’t perform that action at this time.
0 commit comments