diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-09-08 06:36:28 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-09-08 06:36:28 +0000 |
commit | 000b89c718fdef3790a56fad9cbbfcdcf7fbea52 (patch) | |
tree | 9603419213adad41e8b246a4ae660cf206d04e42 /Text/Pandoc/Writers/OpenDocument.hs | |
parent | 2e893b43c4b0536957d46289e7f64b4943734bda (diff) | |
download | pandoc-000b89c718fdef3790a56fad9cbbfcdcf7fbea52.tar.gz |
Use Data.List's 'intercalate' instead of custom 'joinWithSep'.
+ Removed joinWithSep definition from Text.Pandoc.Shared.
+ Replaced joinWithSep with intercalate
+ Depend on base >= 3, since in base < 3 intercalate is not included.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1428 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Writers/OpenDocument.hs')
-rw-r--r-- | Text/Pandoc/Writers/OpenDocument.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Text/Pandoc/Writers/OpenDocument.hs b/Text/Pandoc/Writers/OpenDocument.hs index 5ba92368e..a49bed49f 100644 --- a/Text/Pandoc/Writers/OpenDocument.hs +++ b/Text/Pandoc/Writers/OpenDocument.hs @@ -39,6 +39,7 @@ import Control.Applicative ( (<$>) ) import Control.Arrow ( (***), (>>>) ) import Control.Monad.State hiding ( when ) import Data.Char (chr) +import Data.List (intercalate) -- | Auxiliary function to convert Plain block to Para. plainToPara :: Block -> Block @@ -171,7 +172,7 @@ authorToOpenDocument name = (firstname, lastname) = case lengthname of 0 -> ("","") 1 -> ("", name) - n -> (joinWithSep " " (take (n-1) namewords), last namewords) + n -> (intercalate " " (take (n-1) namewords), last namewords) in inParagraphTagsWithStyle "Author" $ (text $ escapeStringForXML firstname) <+> (text $ escapeStringForXML lastname) |