From 637b22ac18ab0d865900d1e01d2b145d7ca75695 Mon Sep 17 00:00:00 2001 From: Kostas Chatzikokolakis Date: Thu, 5 Sep 2019 18:59:31 +0300 Subject: [PATCH] Support mmark (replace
by
) Mmark produces "
" while blackfriday produces "
". A simple replace allows to support both. --- layouts/partials/reveal-hugo/slides.html | 2 ++ layouts/shortcodes/slide.html | 1 + 2 files changed, 3 insertions(+) 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 -}} {{- $content := replace .Content "
\n\n
" "
" -}} + + {{- $content := replace $content "
" "
" -}} {{- range (split $content "
") -}} 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 "
" "
" -}} {{- $slides := split $html "
" -}} {{- range $slides -}} {{- $scratch.Add "slides" . -}}