mirror of https://github.com/docker/docs.git
Merge pull request #19973 from dvdksn/fix-toc-html
fix: pass heading text through md renderer
This commit is contained in:
commit
bbb894f3e4
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue