Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/VincentTam/huginn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/single.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 24f4dd5..1584dcf 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -49,7 +49,9 @@
{{ if .TableOfContents }}
<details>
<summary>{{ i18n "toc" }}</summary>
- {{- .TableOfContents -}}
+ {{- $emtLiPtrn := "(?s)<ul>\\s<li>\\s<ul>(.*)</li>\\s</ul>" -}}
+ {{- $rplcEmtLi := "<ul>$1" -}}
+ {{ .TableOfContents | replaceRE $emtLiPtrn $rplcEmtLi | safeHTML }}
</details>
{{- end -}}
{{- .Content -}}