git.iko.soy/typeable/pandoc
on master help sign in
DocBook writer: for linebreak, but newline in literallayout.

Closes #725.

commitf53e0a44ce6bd9457d042d191524e0ea2f773b33 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 28 Jan 2013, 11:17 (14 years ago) parent2e00ca2
2 files changed+3−2
src/Text/Pandoc/Writers/Docbook.hs+1−1 tests/writer.docbook+2−1
src/Text/Pandoc/Writers/Docbook.hs+1−1
@@ -282,7 +282,7 @@ inlineToDocbook opts (Math t str)
282282 fixNS = everywhere (mkT fixNS')
283283inlineToDocbook _ (RawInline f x) | f == "html" || f == "docbook" = text x
284284 | otherwise = empty
285−inlineToDocbook _ LineBreak = inTagsSimple "literallayout" empty
285+inlineToDocbook _ LineBreak = flush $ inTagsSimple "literallayout" (text "\n")
286286inlineToDocbook _ Space = space
287287inlineToDocbook opts (Link txt (src, _)) =
288288 if isPrefixOf "mailto:" src
tests/writer.docbook+2−1
@@ -67,7 +67,8 @@
6767 Here’s one with a bullet. * criminey.
6868 </para>
6969 <para>
70− There should be a hard line break<literallayout></literallayout>here.
70+ There should be a hard line break<literallayout>
71+</literallayout>here.
7172 </para>
7273</sect1>
7374<sect1 id="block-quotes">