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
|
{{ partial "heading.html" (dict
|
||||||
"level" .Level
|
"level" .Level
|
||||||
"text" (.Text | plainify | safeHTML)
|
"text" (.Text | safeHTML)
|
||||||
"id" (.Attributes.id | default .Anchor)
|
"id" (.Attributes.id | default .Anchor)
|
||||||
"class" .Attributes.class
|
"class" .Attributes.class
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
{{- range . }}
|
{{- range . }}
|
||||||
{{- if and (ge .Level $min) (le .Level $max) }}
|
{{- if and (ge .Level $min) (le .Level $max) }}
|
||||||
<li>
|
<li>
|
||||||
<a class="link lg:no-underline" href="#{{ .ID }}">{{ .Title }}</a>
|
<a class="link lg:no-underline" href="#{{ .ID }}">{{ markdownify .Title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Headings }}
|
{{- with .Headings }}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
href="#{{ $text | anchorize }}"
|
href="#{{ $text | anchorize }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
>{{ plainify $text }}</a>
|
>{{ markdownify $text }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue