Handle non-ascii chars in toc id
This commit is contained in:
parent
5645700243
commit
35ccaa287e
|
@ -5,7 +5,11 @@
|
|||
<ol>
|
||||
{{ range $headings }}
|
||||
<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 }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue
Block a user