@@ -208,7 +208,7 @@ withParagraphStyle :: WriterOptions -> String -> [Block] -> State WriterState Do
208208withParagraphStyle o s (b:bs)
209209 | Para l <- b = go =<< inParagraphTagsWithStyle s <$> inlinesToOpenDocument o l
210210 | otherwise = go =<< blockToOpenDocument o b
211− where go i = ($$) i <$> withParagraphStyle o s bs
211+ where go i = (<>) i <$> withParagraphStyle o s bs
212212withParagraphStyle _ _ [] = return empty
213213
214214inPreformattedTags :: String -> State WriterState Doc
@@ -288,9 +288,9 @@ blocksToOpenDocument o b = vcat <$> mapM (blockToOpenDocument o) b
288288-- | Convert a Pandoc block element to OpenDocument.
289289blockToOpenDocument :: WriterOptions -> Block -> State WriterState Doc
290290blockToOpenDocument o bs
291− | Plain b <- bs = inParagraphTags <$> wrap o b
292− | Para b <- bs = inParagraphTags <$> wrap o b
293− | Header i b <- bs = inHeaderTags i <$> wrap o b
291+ | Plain b <- bs = inParagraphTags <$> inlinesToOpenDocument o b
292+ | Para b <- bs = inParagraphTags <$> inlinesToOpenDocument o b
293+ | Header i b <- bs = inHeaderTags i <$> inlinesToOpenDocument o b
294294 | BlockQuote b <- bs = mkBlockQuote b
295295 | CodeBlock _ s <- bs = preformatted s
296296 | RawHtml _ <- bs = return empty
@@ -353,12 +353,6 @@ tableItemToOpenDocument o tn (n,i) =
353353 in inTags True "table:table-cell" a <$>
354354 withParagraphStyle o n (map plainToPara i)
355355
356−-- | Take list of inline elements and return wrapped doc.
357−wrap :: WriterOptions -> [Inline] -> State WriterState Doc
358−wrap o l = if writerWrapText o
359− then fsep <$> mapM (inlinesToOpenDocument o) (splitBy Space l)
360− else inlinesToOpenDocument o l
361−
362356-- | Convert a list of inline elements to OpenDocument.
363357inlinesToOpenDocument :: WriterOptions -> [Inline] -> State WriterState Doc
364358inlinesToOpenDocument o l = hcat <$> mapM (inlineToOpenDocument o) l
@@ -405,7 +399,7 @@ inlineToOpenDocument o ils
405399 let footNote t = inTags False "text:note"
406400 [ ("text:id" , "ftn" ++ show n)
407401 , ("text:note-class", "footnote" )] $
408− inTagsSimple "text:note-citation" (text . show $ n + 1) $$
402+ inTagsSimple "text:note-citation" (text . show $ n + 1) <>
409403 inTagsSimple "text:note-body" t
410404 nn <- footNote <$> withParagraphStyle o "Footnote" l
411405 addNote nn