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/Readers/HTML.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/Readers/HTML.hs')
-rw-r--r-- | Text/Pandoc/Readers/HTML.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Text/Pandoc/Readers/HTML.hs b/Text/Pandoc/Readers/HTML.hs index 72e54ed23..a9025f0d2 100644 --- a/Text/Pandoc/Readers/HTML.hs +++ b/Text/Pandoc/Readers/HTML.hs @@ -46,7 +46,7 @@ import Text.Pandoc.Definition import Text.Pandoc.Shared import Text.Pandoc.CharacterReferences ( decodeCharacterReferences ) import Data.Maybe ( fromMaybe ) -import Data.List ( takeWhile, dropWhile, isPrefixOf, isSuffixOf ) +import Data.List ( takeWhile, dropWhile, isPrefixOf, isSuffixOf, intercalate ) import Data.Char ( toLower, isAlphaNum ) import Network.URI ( parseURIReference, URI (..) ) @@ -534,7 +534,7 @@ definitionListItem :: GenParser Char ParserState ([Inline], [Block]) definitionListItem = try $ do terms <- sepEndBy1 (inlinesIn "dt") spaces defs <- sepEndBy1 (blocksIn "dd") spaces - let term = joinWithSep [LineBreak] terms + let term = intercalate [LineBreak] terms return (term, concat defs) -- @@ -580,7 +580,7 @@ code = try $ do -- remove internal line breaks, leading and trailing space, -- and decode character references return $ Code $ decodeCharacterReferences $ removeLeadingTrailingSpace $ - joinWithSep " " $ lines result + intercalate " " $ lines result rawHtmlInline :: GenParser Char ParserState Inline rawHtmlInline = do |