summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gnoutcheff <gnoutchd@softwarefreedom.org>2021-09-21 19:54:38 -0400
committerDaniel Gnoutcheff <gnoutchd@softwarefreedom.org>2021-09-21 19:54:38 -0400
commit909f4fa0d426203486dfff1ba1ad9f3a2f5605d2 (patch)
tree87bed6e49beea5c51e261555836d2049cada88a3
parentfc4a86bb58ba36c5302591adc78148d2a35ad57a (diff)
Disable markdown_in_html_blocks extension
-rw-r--r--app/Main.hs8
1 files changed, 7 insertions, 1 deletions
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
-- <div class="inline" id="some_string"></div>