From ed588464971fd0f13c241e4176731711019f369b Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 24 Jan 2009 19:59:00 +0000 Subject: [PATCH] Fixed bug in mediawiki writer: improper closing tags in tables. instead of , instead of . Thanks to Benct Philip Jonsson for reporting the bug. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1524 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Writers/MediaWiki.hs | 2 +- tests/tables.mediawiki | 144 +++++++++++++++---------------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Text/Pandoc/Writers/MediaWiki.hs b/Text/Pandoc/Writers/MediaWiki.hs index d25cfaed0..c5f6b3bf1 100644 --- a/Text/Pandoc/Writers/MediaWiki.hs +++ b/Text/Pandoc/Writers/MediaWiki.hs @@ -295,7 +295,7 @@ tableItemToMediaWiki opts tag' align' width' item = do if width' /= 0 then " style=\"width: " ++ (show (truncate (100 * width') :: Integer)) ++ "%;\"" else "" - return $ "<" ++ tag' ++ attrib ++ ">" ++ contents ++ "<" ++ tag' ++ ">" + return $ "<" ++ tag' ++ attrib ++ ">" ++ contents ++ "" -- | Convert list of Pandoc block elements to MediaWiki. blockListToMediaWiki :: WriterOptions -- ^ Options diff --git a/tests/tables.mediawiki b/tests/tables.mediawiki index abe1cf530..989159846 100644 --- a/tests/tables.mediawiki +++ b/tests/tables.mediawiki @@ -2,122 +2,122 @@ Simple table with caption: - + + + - + + + - + + + - + + +
Demonstration of simple table syntax.
Right -Left -Center -Default +RightLeftCenterDefault
12 -12 -12 -12 +12121212
123 -123 -123 -123 +123123123123
1 -1 -1 -1 +1111
Simple table without caption: - + + + - + + + - + + + - + + +
Right -Left -Center -Default +RightLeftCenterDefault
12 -12 -12 -12 +12121212
123 -123 -123 -123 +123123123123
1 -1 -1 -1 +1111
Simple table indented two spaces: - + + + - + + + - + + + - + + +
Demonstration of simple table syntax.
Right -Left -Center -Default +RightLeftCenterDefault
12 -12 -12 -12 +12121212
123 -123 -123 -123 +123123123123
1 -1 -1 -1 +1111
Multiline table with caption: - + + + - + + + - + + +
Here's the caption. It may span multiple lines.
Centered Header -Left Aligned -Right Aligned -Default aligned +Centered HeaderLeft AlignedRight AlignedDefault aligned
First -row -12.0 -Example of a row that spans multiple lines. +Firstrow12.0Example of a row that spans multiple lines.
Second -row -5.0 -Here's another one. Note the blank line between rows. +Secondrow5.0Here's another one. Note the blank line between rows.
Multiline table without caption: - + + + - + + + - + + +
Centered Header -Left Aligned -Right Aligned -Default aligned +Centered HeaderLeft AlignedRight AlignedDefault aligned
First -row -12.0 -Example of a row that spans multiple lines. +Firstrow12.0Example of a row that spans multiple lines.
Second -row -5.0 -Here's another one. Note the blank line between rows. +Secondrow5.0Here's another one. Note the blank line between rows.