aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docbook.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-01-04 01:04:56 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-01-04 01:04:56 +0000
commit99959b68e9ebbe48e952ce915368d6fc88a7d41a (patch)
treeaa25d2ffcddacb044a35fa48865794d7d013dab6 /src/Text/Pandoc/Writers/Docbook.hs
parente4880319e66493948e198cdd8b3d18ba572a2967 (diff)
downloadpandoc-99959b68e9ebbe48e952ce915368d6fc88a7d41a.tar.gz
+ Improved text wrapping algorithm in markdown, docbook, and RST writers.
LineBreaks no longer cause ugly wrapping in Markdown output. + Replaced splitBySpace with the more general, polymorphic function splitBy (in Text/Pandoc/Shared). git-svn-id: https://pandoc.googlecode.com/svn/trunk@411 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/Docbook.hs')
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs
index 8ccf84f30..5f6f1c8b1 100644
--- a/src/Text/Pandoc/Writers/Docbook.hs
+++ b/src/Text/Pandoc/Writers/Docbook.hs
@@ -176,7 +176,7 @@ cdata str = text $ "<![CDATA[" ++ str ++ "]]>"
-- | Take list of inline elements and return wrapped doc.
wrap :: WriterOptions -> [Inline] -> Doc
-wrap options lst = fsep $ map (hcat . (map (inlineToDocbook options))) (splitBySpace lst)
+wrap options lst = fsep $ map (inlinesToDocbook options) (splitBy Space lst)
-- | Escape a string for XML (with "smart" option if specified).
stringToXML :: WriterOptions -> String -> String