diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-07 08:26:32 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-07 08:26:32 +0000 |
commit | 6ddf8da444351c802ae96101cbc32893e132a5bf (patch) | |
tree | 44220201d42b27efb0e03cfa870b083a38ce71e0 /src/Text | |
parent | 56ca3e8dcf955e0685b42cdae8f3c86cca161d51 (diff) | |
download | pandoc-6ddf8da444351c802ae96101cbc32893e132a5bf.tar.gz |
Blank lines after lists in MediaWiki writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1655 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/MediaWiki.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs index c5f6b3bf1..03fae18ba 100644 --- a/src/Text/Pandoc/Writers/MediaWiki.hs +++ b/src/Text/Pandoc/Writers/MediaWiki.hs @@ -141,7 +141,7 @@ blockToMediaWiki opts x@(BulletList items) = do modify $ \s -> s { stListLevel = stListLevel s ++ "*" } contents <- mapM (listItemToMediaWiki opts) items modify $ \s -> s { stListLevel = init (stListLevel s) } - return $ vcat contents + return $ vcat contents ++ "\n" blockToMediaWiki opts x@(OrderedList attribs items) = do oldUseTags <- get >>= return . stUseTags @@ -156,7 +156,7 @@ blockToMediaWiki opts x@(OrderedList attribs items) = do modify $ \s -> s { stListLevel = stListLevel s ++ "#" } contents <- mapM (listItemToMediaWiki opts) items modify $ \s -> s { stListLevel = init (stListLevel s) } - return $ vcat contents + return $ vcat contents ++ "\n" blockToMediaWiki opts x@(DefinitionList items) = do oldUseTags <- get >>= return . stUseTags @@ -171,7 +171,7 @@ blockToMediaWiki opts x@(DefinitionList items) = do modify $ \s -> s { stListLevel = stListLevel s ++ ";" } contents <- mapM (definitionListItemToMediaWiki opts) items modify $ \s -> s { stListLevel = init (stListLevel s) } - return $ vcat contents + return $ vcat contents ++ "\n" -- Auxiliary functions for lists: @@ -251,9 +251,7 @@ tr x = "<tr>\n" ++ x ++ "\n</tr>" -- | Concatenates strings with line breaks between them. vcat :: [String] -> String -vcat [] = "" -vcat [x] = x -vcat (x:xs) = x ++ "\n" ++ vcat xs +vcat = intercalate "\n" -- Auxiliary functions for tables: |