Rapporter / pander

An R Pandoc Writer: Convert arbitrary R objects into markdown
http://rapporter.github.io/pander/
Open Software License 3.0
294 stars 65 forks source link

Missing blank line in single line multiline table #224

Closed Dris101 closed 9 years ago

Dris101 commented 9 years ago

As per the pandoc docs, a single line multi-table should have a blank line before the row of dashes that ends the table, otherwise the table may be interpreted as a simple table. (see the docs for the multiline_tables extension)

daroczig commented 9 years ago

Thanks for reporting this, much appreciated. A quick addition: this only happens if we have a one-liner multiline table without a header, e.g.:

> pander(unname(data.frame(a = 'lorem ipsum', b = 'foobar')), style = 'multiline', split.cells = 5)

----- ------
lorem foobar
ipsum       
----- ------

versus

> pander(unname(data.frame(a = c('lorem', 'ipsum'), b = 'foobar')), style = 'simple', split.cells = 5)

----- ------
lorem foobar
ipsum foobar
----- ------