socmap / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Text.Pandoc.Builder.simpleTable always produces empty tables #301

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Tables produced by simpleTable seem to render with all their cells empty.

What steps will reproduce the problem?

$ ghci
Prelude> :m +Text.Pandoc Text.Pandoc.Builder
Prelude Text.Pandoc Text.Pandoc.Builder> let headers = map (plain . text) 
["foo", "bar"]
Prelude Text.Pandoc Text.Pandoc.Builder> let rows = map (map (plain . text)) 
[["1", "2"], ["3", "4"]]
Prelude Text.Pandoc Text.Pandoc.Builder> putStrLn $ writeMarkdown 
defaultWriterOptions $ doc $ simpleTable headers rows

What is the expected output? What do you see instead?

Expected:
  foo   bar
  ----- -----
  1     2
  3     4

Actual:
  ----- -----

What version of the product are you using? On what operating system?

ghc 7.0.3, Haskell Platform 2011, pandoc 1.8.1.1, pandoc-types 1.8.0.1, Linux

Please provide any additional information below.

I think this is because simpleTable passes an empty list of (alignment, 
cellwidth) pairs.

Original issue reported on code.google.com by sam.mojo...@googlemail.com on 8 May 2011 at 10:22

GoogleCodeExporter commented 8 years ago
Thanks for the bug report and patch.  Patch applied, 1.8.0.2 released on 
HackageDB!

Original comment by fiddloso...@gmail.com on 11 May 2011 at 10:04