ZimWiki writer: allow links and emphasis in headers
The latest version of ZimWiki supports this. Closes: #6605
This commit is contained in:
parent
5736b331d8
commit
b6239f4150
2 changed files with 4 additions and 4 deletions
|
@ -116,7 +116,7 @@ blockToZimWiki opts b@(RawBlock f str)
|
||||||
blockToZimWiki _ HorizontalRule = return "\n----\n"
|
blockToZimWiki _ HorizontalRule = return "\n----\n"
|
||||||
|
|
||||||
blockToZimWiki opts (Header level _ inlines) = do
|
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 ) "="
|
let eqs = T.replicate ( 7 - level ) "="
|
||||||
return $ eqs <> " " <> contents <> " " <> eqs <> "\n"
|
return $ eqs <> " " <> contents <> " " <> eqs <> "\n"
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
|
||||||
|
|
||||||
====== Headers ======
|
====== Headers ======
|
||||||
|
|
||||||
===== Level 2 with an embedded link =====
|
===== Level 2 with an [[url|embedded link]] =====
|
||||||
|
|
||||||
==== Level 3 with emphasis ====
|
==== Level 3 with //emphasis// ====
|
||||||
|
|
||||||
=== Level 4 ===
|
=== 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 1 ======
|
||||||
|
|
||||||
===== Level 2 with emphasis =====
|
===== Level 2 with //emphasis// =====
|
||||||
|
|
||||||
==== Level 3 ====
|
==== Level 3 ====
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue