aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-04-26 12:29:06 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-04-26 12:29:06 -0700
commit619aaf29aa0bee2c8683fa5b73dcd23a8695b9e7 (patch)
tree2a9e5cd496201a7e4aff5b5e97e7a17fe7acfecb /src/Text/Pandoc
parenta96c762a10f9b6e97a5660664750ad6e3ef7f5b7 (diff)
parentf224567d52096fd6219a2a4a4d2b9cbcc5219e7a (diff)
downloadpandoc-619aaf29aa0bee2c8683fa5b73dcd23a8695b9e7.tar.gz
Merge branch 'fb2-hrblankline' of https://github.com/labdsf/pandoc into labdsf-fb2-hrblankline
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs
index e1fa7f474..a46011a8f 100644
--- a/src/Text/Pandoc/Writers/FB2.hs
+++ b/src/Text/Pandoc/Writers/FB2.hs
@@ -365,10 +365,7 @@ blockToXml h@Header{} = do
-- should not occur after hierarchicalize, except inside lists/blockquotes
report $ BlockNotRendered h
return []
-blockToXml HorizontalRule = return
- [ el "empty-line" ()
- , el "p" (txt (replicate 10 '—'))
- , el "empty-line" () ]
+blockToXml HorizontalRule = return [ el "empty-line" () ]
blockToXml (Table caption aligns _ headers rows) = do
hd <- mkrow "th" headers aligns
bd <- mapM (\r -> mkrow "td" r aligns) rows
@@ -398,7 +395,7 @@ plainToPara [] = []
plainToPara (Plain inlines : rest) =
Para inlines : plainToPara rest
plainToPara (Para inlines : rest) =
- Para inlines : Plain [LineBreak] : plainToPara rest
+ Para inlines : HorizontalRule : plainToPara rest -- HorizontalRule will be converted to <empty-line />
plainToPara (p:rest) = p : plainToPara rest
-- Simulate increased indentation level. Will not really work
@@ -449,8 +446,8 @@ toXml (Quoted DoubleQuote ss) = do
toXml (Cite _ ss) = cMapM toXml ss -- FIXME: support citation styles
toXml (Code _ s) = return [el "code" s]
toXml Space = return [txt " "]
-toXml SoftBreak = return [txt " "]
-toXml LineBreak = return [el "empty-line" ()]
+toXml SoftBreak = return [txt "\n"]
+toXml LineBreak = return [txt "\n"]
toXml (Math _ formula) = insertMath InlineImage formula
toXml il@(RawInline _ _) = do
report $ InlineNotRendered il