summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/FB2.hs
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2016-11-11 13:09:49 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:39 +0100
commita6b469c02b3c21cfc1b5169ea3e75b7388f55691 (patch)
treef72130a5a83d27aecf67a5194039705235326191 /src/Text/Pandoc/Writers/FB2.hs
parent30b3412857fc604656aac53d57730ad2442a3599 (diff)
Adds support for pagebreaks (when it makes sense)
Update all writers to take into account page breaks. A straightforwad, far from complete, implementation of page breaks in selected writers. Readers will have to follow in the future as well.
Diffstat (limited to 'src/Text/Pandoc/Writers/FB2.hs')
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs
index 5538ca061..8c4817ac6 100644
--- a/src/Text/Pandoc/Writers/FB2.hs
+++ b/src/Text/Pandoc/Writers/FB2.hs
@@ -443,6 +443,7 @@ toXml (Code _ s) = return [el "code" s]
toXml Space = return [txt " "]
toXml SoftBreak = return [txt " "]
toXml LineBreak = return [el "empty-line" ()]
+toXml PageBreak = return []
toXml (Math _ formula) = insertMath InlineImage formula
toXml (RawInline _ _) = return [] -- raw TeX and raw HTML are suppressed
toXml (Link _ text (url,ttl)) = do
@@ -574,6 +575,7 @@ plain (Code _ s) = s
plain Space = " "
plain SoftBreak = " "
plain LineBreak = "\n"
+plain PageBreak = "\n"
plain (Math _ s) = s
plain (RawInline _ s) = s
plain (Link _ text (url,_)) = concat (map plain text ++ [" <", url, ">"])