Fixed a table of contents layout bug

This commit is contained in:
Steven Engler 2019-09-13 00:42:37 -04:00
parent fe577bab64
commit 492f067084

View File

@ -21,8 +21,8 @@
<span class="table-of-contents-title">Table of Contents</span> <span class="table-of-contents-title">Table of Contents</span>
</summary> </summary>
{{ $toc := .TableOfContents -}} {{ $toc := .TableOfContents -}}
{{- $toc := replaceRE `<ul>\s?<li>\s?<ul>` `<ul>` $toc -}} {{- $toc := replaceRE `<nav(.*)>(\s?)<ul>\s?<li>\s?<ul>` `<nav${1}>${2}<ul>` $toc -}}
{{- $toc := replaceRE `</ul>\s?</li>\s?</ul>` `</ul>` $toc -}} {{- $toc := replaceRE `</ul>\s?</li>\s?</ul>(\s?)</nav>` `</ul>${1}</nav>` $toc -}}
{{- safeHTML $toc }} {{- safeHTML $toc }}
</details> </details>
</div> </div>