diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-13 03:19:03 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-13 03:19:03 +0000 |
commit | bc31d9fe28db967bf02bc165300f68b5061f8db9 (patch) | |
tree | 0da13e6ede3ec527411a3a20d954f38dfb5584ae | |
parent | a34afa91efd1ba313d0a2b4a52a878d6e2453730 (diff) | |
download | pandoc-bc31d9fe28db967bf02bc165300f68b5061f8db9.tar.gz |
Texinfo writer: fixed headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1880 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | src/Text/Pandoc/Writers/Texinfo.hs | 4 | ||||
-rw-r--r-- | tests/tables.texinfo | 35 |
2 files changed, 38 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs index c6e1892c9..db32e5a62 100644 --- a/src/Text/Pandoc/Writers/Texinfo.hs +++ b/src/Text/Pandoc/Writers/Texinfo.hs @@ -191,7 +191,9 @@ blockToTexinfo (Header level lst) = do seccmd _ = error "illegal seccmd level" blockToTexinfo (Table caption aligns widths heads rows) = do - headers <- tableHeadToTexinfo aligns heads + headers <- if all null heads + then return empty + else tableHeadToTexinfo aligns heads captionText <- inlineListToTexinfo caption rowsText <- mapM (tableRowToTexinfo aligns) rows colDescriptors <- diff --git a/tests/tables.texinfo b/tests/tables.texinfo index 592e36855..f18de7012 100644 --- a/tests/tables.texinfo +++ b/tests/tables.texinfo @@ -122,3 +122,38 @@ Second @tab Here's another one. Note the blank line between rows. @end multitable +Table without column headers: + +@multitable {123} {123} {123} {123} +@item +12 + @tab 12 + @tab 12 + @tab 12 +@item +123 + @tab 123 + @tab 123 + @tab 123 +@item +1 + @tab 1 + @tab 1 + @tab 1 +@end multitable + +Multiline table without column headers: + +@multitable @columnfractions 0.15 0.14 0.16 0.34 +@item +First + @tab row + @tab 12.0 + @tab Example of a row that spans multiple lines. +@item +Second + @tab row + @tab 5.0 + @tab Here's another one. Note the blank line between rows. +@end multitable + |