Fixed table of contents regex
This was broken by a change in some old Hugo version.
This commit is contained in:
parent
f8c366f6dc
commit
ccb57703a6
@ -22,8 +22,8 @@
|
|||||||
</summary>
|
</summary>
|
||||||
{{ $toc := .TableOfContents -}}
|
{{ $toc := .TableOfContents -}}
|
||||||
{{/* Workaround for an extra layer of indentation (https://discourse.gohugo.io/t/2303) */}}
|
{{/* Workaround for an extra layer of indentation (https://discourse.gohugo.io/t/2303) */}}
|
||||||
{{- $toc := replaceRE `<nav(.*)>(\s?)<ul>\s?<li>\s?<ul>` `<nav${1}>${2}<ul>` $toc -}}
|
{{- $toc := replaceRE `<nav(.*)>(\s*)<ul>\s*<li>\s*<ul>` `<nav${1}>${2}<ul>` $toc -}}
|
||||||
{{- $toc := replaceRE `</ul>\s?</li>\s?</ul>(\s?)</nav>` `</ul>${1}</nav>` $toc -}}
|
{{- $toc := replaceRE `</ul>\s*</li>\s*</ul>(\s*)</nav>` `</ul>${1}</nav>` $toc -}}
|
||||||
{{- safeHTML $toc }}
|
{{- safeHTML $toc }}
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user