Footnote markup shouldn't be interpreted as new slides

Addresses #4
This commit is contained in:
dzello 2018-07-13 00:21:48 +02:00
parent da2ff896de
commit ee2a2268cb

View file

@ -5,14 +5,16 @@
{{ range . -}} {{ range . -}}
<!-- Don't process empty content files --> <!-- Don't process empty content files -->
{{- if ne (len .Content) 0 -}} {{- if ne (len .Content) 0 -}}
<!-- Remove the <hr /> tag generated by blackfriday for footnotes -->
{{ $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" }}
<!-- Split the processed content by <hr /> tag --> <!-- Split the processed content by <hr /> tag -->
{{- range (split .Content "<hr />") -}} {{- range (split $content "<hr />") -}}
<!-- Only wrap in <section> tag if not already wrapped by shortcode --> <!-- Only wrap in <section> tag if not already wrapped by shortcode -->
{{- if in . "data-noprocess" -}} {{- if in . "data-noprocess" -}}
{{- . | safeHTML -}} {{- . | safeHTML -}}
{{- else -}} {{- else -}}
<section> <section>
{{ . | safeHTML }} {{- . | safeHTML }}
</section> </section>
{{ end -}} {{ end -}}
{{- end -}} {{- end -}}