git.iko.soy/typeable/pandoc
on master help sign in
ZimWiki writer: allow links and emphasis in headers

The latest version of ZimWiki supports this. Closes: #6605

commitb6239f41509c368b5befd316c290b5b6cc6f00e3 authorAlbert Krewinkel <albert@zeitkraut.de> dateThu 20 May 2021, 10:48 (5 years ago) parent5736b33
2 files changed+4−4
src/Text/Pandoc/Writers/ZimWiki.hs+1−1 test/writer.zimwiki+3−3
src/Text/Pandoc/Writers/ZimWiki.hs+1−1
@@ -116,7 +116,7 @@ blockToZimWiki opts b@(RawBlock f str)
116116blockToZimWiki _ HorizontalRule = return "\n----\n"
117117
118118blockToZimWiki opts (Header level _ inlines) = do
119− contents <- inlineListToZimWiki opts $ removeFormatting inlines -- emphasis, links etc. not allowed in headers
119+ contents <- inlineListToZimWiki opts inlines
120120 let eqs = T.replicate ( 7 - level ) "="
121121 return $ eqs <> " " <> contents <> " " <> eqs <> "\n"
122122
test/writer.zimwiki+3−3
@@ -8,9 +8,9 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
88
99====== Headers ======
1010
11−===== Level 2 with an embedded link =====
11+===== Level 2 with an [[url|embedded link]] =====
1212
13−==== Level 3 with emphasis ====
13+==== Level 3 with //emphasis// ====
1414
1515=== Level 4 ===
1616
@@ -18,7 +18,7 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
1818
1919====== Level 1 ======
2020
21−===== Level 2 with emphasis =====
21+===== Level 2 with //emphasis// =====
2222
2323==== Level 3 ====
2424