fix: ensure render template contains no empty newlines (#76)
This commit is contained in:
parent
10e95b8c7b
commit
798a2679c1
3 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
{{ $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Page.Site.Params.GeekdocAnchor)) }}
|
||||
{{- $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Page.Site.Params.GeekdocAnchor)) -}}
|
||||
|
||||
{{ if $showAnchor }}
|
||||
{{- if $showAnchor -}}
|
||||
<div class="gdoc-page__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
{{ .Text | safeHTML }}
|
||||
|
@ -9,10 +9,10 @@
|
|||
</a>
|
||||
</h{{ .Level }}>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
<div class="gdoc-page__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue