Merge pull request #516 from schnerring/simplify-heading-rendering
Simplify heading rendering
This commit is contained in:
commit
ee6b5c4c3d
|
@ -0,0 +1 @@
|
||||||
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor" aria-hidden="true">#</a></h{{ .Level }}>
|
|
@ -31,7 +31,7 @@
|
||||||
{{ partial "sidebar/docs-toc.html" . }}
|
{{ partial "sidebar/docs-toc.html" . }}
|
||||||
</nav>
|
</nav>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ partial "main/headline-hash.html" .Content }}
|
{{ .Content }}
|
||||||
{{ if .Site.Params.editPage -}}
|
{{ if .Site.Params.editPage -}}
|
||||||
{{ partial "main/edit-page.html" . }}
|
{{ partial "main/edit-page.html" . }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -45,4 +45,4 @@
|
||||||
-->
|
-->
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{{ . | replaceRE "(<h[2-9] id=\"([^\"]+)\".+)(</h[2-9]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true">#</a> ${3}` | safeHTML }}
|
|
Loading…
Reference in New Issue