mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Merge pull request #19973 from dvdksn/fix-toc-html
fix: pass heading text through md renderer
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{{ partial "heading.html" (dict
|
||||
"level" .Level
|
||||
"text" (.Text | plainify | safeHTML)
|
||||
"text" (.Text | safeHTML)
|
||||
"id" (.Attributes.id | default .Anchor)
|
||||
"class" .Attributes.class
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
{{- range . }}
|
||||
{{- if and (ge .Level $min) (le .Level $max) }}
|
||||
<li>
|
||||
<a class="link lg:no-underline" href="#{{ .ID }}">{{ .Title }}</a>
|
||||
<a class="link lg:no-underline" href="#{{ .ID }}">{{ markdownify .Title }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- with .Headings }}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{{ else }}
|
||||
href="#{{ $text | anchorize }}"
|
||||
{{ end }}
|
||||
>{{ plainify $text }}</a>
|
||||
>{{ markdownify $text }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user