From 909f4fa0d426203486dfff1ba1ad9f3a2f5605d2 Mon Sep 17 00:00:00 2001 From: Daniel Gnoutcheff Date: Tue, 21 Sep 2021 19:54:38 -0400 Subject: Disable markdown_in_html_blocks extension --- app/Main.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index 6a416be..c1ebbbd 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -109,7 +109,13 @@ htmlize mdwn = either (error . show) T.unpack . P.runPure . (P.writeHtml5String P.def . PW.walk preserveIkiInline =<<) . P.readMarkdown readOpts . PS.tabFilter 4 . T.pack . filter (\c -> c `elem` ("\t\n\r" :: String) || (c>=' ' && c/='\x7f')) $ mdwn - where readOpts = P.def {P.readerExtensions = P.pandocExtensions} + where + readOpts = P.def + { P.readerExtensions = + -- Several IkiWiki directives expand to raw HTML blocks. Any markdown + -- inside these blocks is rendered separately. + P.disableExtension P.Ext_markdown_in_html_blocks P.pandocExtensions + } -- Lines of the form --
-- cgit v1.2.1