Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dzello/reveal-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Dzielak <dzello@users.noreply.github.com>2019-09-06 21:36:58 +0300
committerGitHub <noreply@github.com>2019-09-06 21:36:58 +0300
commit68429eccc31d5347a16e13bb14af7c2770d08101 (patch)
treef78fba241a3db0221bb2d9df56e1e9aa891499b6
parenta1df4f02d99da0dd0d15ebe9cd90fa97b69d9ea0 (diff)
parent637b22ac18ab0d865900d1e01d2b145d7ca75695 (diff)
Merge pull request #50 from chatziko/master
Support mmark
-rw-r--r--layouts/partials/reveal-hugo/slides.html2
-rw-r--r--layouts/shortcodes/slide.html1
2 files changed, 3 insertions, 0 deletions
diff --git a/layouts/partials/reveal-hugo/slides.html b/layouts/partials/reveal-hugo/slides.html
index bb22e16..ac54247 100644
--- a/layouts/partials/reveal-hugo/slides.html
+++ b/layouts/partials/reveal-hugo/slides.html
@@ -4,6 +4,8 @@
{{- 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\">" -}}
+ <!-- Support both <hr /> (blackfriday) and <hr> (mmark) -->
+ {{- $content := replace $content "<hr>" "<hr />" -}}
<!-- Split the processed content by <hr /> tag -->
{{- range (split $content "<hr />") -}}
<!-- Only wrap in <section> tag if not already wrapped by shortcode -->
diff --git a/layouts/shortcodes/slide.html b/layouts/shortcodes/slide.html
index aaa49fa..0016326 100644
--- a/layouts/shortcodes/slide.html
+++ b/layouts/shortcodes/slide.html
@@ -8,6 +8,7 @@
{{- $markdownContent = index $markdownContent $dataPath -}}
{{- end -}}
{{- $html := $markdownContent | markdownify -}}
+ {{- $html := replace $html "<hr>" "<hr />" -}}
{{- $slides := split $html "<hr />" -}}
{{- range $slides -}}
{{- $scratch.Add "slides" . -}}