From b6239f41509c368b5befd316c290b5b6cc6f00e3 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 20 May 2021 10:48:28 +0200 Subject: [PATCH] ZimWiki writer: allow links and emphasis in headers The latest version of ZimWiki supports this. Closes: #6605 --- src/Text/Pandoc/Writers/ZimWiki.hs | 2 +- test/writer.zimwiki | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Text/Pandoc/Writers/ZimWiki.hs b/src/Text/Pandoc/Writers/ZimWiki.hs index fcf9e000d..df914f590 100644 --- a/src/Text/Pandoc/Writers/ZimWiki.hs +++ b/src/Text/Pandoc/Writers/ZimWiki.hs @@ -116,7 +116,7 @@ blockToZimWiki opts b@(RawBlock f str) blockToZimWiki _ HorizontalRule = return "\n----\n" blockToZimWiki opts (Header level _ inlines) = do - contents <- inlineListToZimWiki opts $ removeFormatting inlines -- emphasis, links etc. not allowed in headers + contents <- inlineListToZimWiki opts inlines let eqs = T.replicate ( 7 - level ) "=" return $ eqs <> " " <> contents <> " " <> eqs <> "\n" diff --git a/test/writer.zimwiki b/test/writer.zimwiki index 4b384fb20..f793e5760 100644 --- a/test/writer.zimwiki +++ b/test/writer.zimwiki @@ -8,9 +8,9 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s ====== Headers ====== -===== Level 2 with an embedded link ===== +===== Level 2 with an [[url|embedded link]] ===== -==== Level 3 with emphasis ==== +==== Level 3 with //emphasis// ==== === Level 4 === @@ -18,7 +18,7 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s ====== Level 1 ====== -===== Level 2 with emphasis ===== +===== Level 2 with //emphasis// ===== ==== Level 3 ====