MediaWiki writer: Avoid extra blank line in tables with empty cells.
Note that the old output is semantically identical, but the
new output looks better.
Closes #4794.
commit50e8c3b107c56d5de4840f369a2e49e4f55cd591
authorJohn MacFarlane <jgm@berkeley.edu>
dateTue 24 Jul 2018, 11:36 (8 years ago)
parent4e899eb
src/Text/Pandoc/Writers/MediaWiki.hs+1
@@ -313,6 +313,7 @@ tableCellToMediaWiki headless rownum (alignment, width, bs) = do
313313 let sep = case bs of
314314 [Plain _] -> " "
315315 [Para _] -> " "
316+ [] -> ""
316317 _ -> "\n"
317318 return $ marker ++ attr ++ sep ++ trimr contents
318319
test/command/4794.mdnew file+18
@@ -0,0 +1,18 @@
1+```
2+% pandoc -f markdown -t mediawiki
3+| Column1 | Column2 | Column3 |
4+| ------- | ------- | ------- |
5+| text | | text |
6+^D
7+{|
8+! Column1
9+! Column2
10+! Column3
11+|-
12+| text
13+|
14+| text
15+|}
16+
17+
18+```