Handle non-ascii chars in toc id
This commit is contained in:
parent
5645700243
commit
35ccaa287e
|
@ -5,7 +5,11 @@
|
||||||
<ol>
|
<ol>
|
||||||
{{ range $headings }}
|
{{ range $headings }}
|
||||||
<li>
|
<li>
|
||||||
<a href="#{{ . | htmlUnescape | plainify | urlize }}">
|
{{ $id := findRE "id=\".*\"" . }}
|
||||||
|
{{ $id = index $id 0 }}
|
||||||
|
{{ $id = strings.TrimPrefix "id=\"" $id }}
|
||||||
|
{{ $id = strings.TrimSuffix "\"" $id }}
|
||||||
|
<a href="#{{ $id }}">
|
||||||
{{ . | htmlUnescape | plainify }}
|
{{ . | htmlUnescape | plainify }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user