diff options
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 2 | ||||
-rw-r--r-- | test/command/5936.md | 40 |
2 files changed, 41 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index dc732b0e6..d8c559214 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -294,7 +294,7 @@ blockToRST (Table caption aligns widths headers rows) = do modify $ \st -> st{ stOptions = oldOpts } return result opts <- gets stOptions - let isSimple = all (== 0) widths + let isSimple = all (== 0) widths && length widths > 1 tbl <- if isSimple then do tbl' <- simpleTable opts blocksToDoc headers rows diff --git a/test/command/5936.md b/test/command/5936.md new file mode 100644 index 000000000..6ad4e83c2 --- /dev/null +++ b/test/command/5936.md @@ -0,0 +1,40 @@ +``` +% pandoc -f gfm -t rst +| Name | +| ---- | +| Foo | +| Bar | +| Baz | +| Quux | +^D ++------+ +| Name | ++======+ +| Foo | ++------+ +| Bar | ++------+ +| Baz | ++------+ +| Quux | ++------+ +``` + +``` +% pandoc -f gfm -t rst +| Name | Number | +| ---- | ------ | +| Foo | 3 | +| Bar | 4 | +| Baz | 2 | +| Quux | 1 | +^D +==== ====== +Name Number +==== ====== +Foo 3 +Bar 4 +Baz 2 +Quux 1 +==== ====== +``` |