Skip to content

Commit

Permalink
Update: more detailed re pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
qqpann committed Nov 30, 2019
1 parent c1aadc8 commit 1500842
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
<div id="toc" class="Box Box--blue mb-3">
<b>{{ .Title }}</b>
{{- $toc := .TableOfContents -}}
{{- $toc := replaceRE `<ul>\n<li>\n<ul>` `<ul>` $toc -}}
{{- $toc := replaceRE `<nav id="TableOfContents">\n<ul>\n<li>\n<ul>` `<nav id="TableOfContents"><ul>` $toc -}}
{{- $toc := replaceRE `</ul>\n</li>\n</ul>\n</nav>` `</ul>\n</nav>` $toc -}}
{{- safeHTML $toc -}}
</div>
{{ end }}
Expand Down

0 comments on commit 1500842

Please sign in to comment.