aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs2
-rw-r--r--test/Tests/Writers/Muse.hs12
2 files changed, 13 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 2001c56fd..1d7a3fd77 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -281,7 +281,7 @@ blockToMuse (Header level (ident,_,_) inlines) = do
-- https://www.gnu.org/software/emacs-muse/manual/muse.html#Horizontal-Rules-and-Anchors
blockToMuse HorizontalRule = return $ blankline $$ "----" $$ blankline
blockToMuse (Table caption aligns widths headers rows) =
- if all (== 0.0) widths
+ if all (== 0.0) widths && length widths > 1
then simpleTable caption headers rows
else do
opts <- asks envOptions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index c6ebac771..6cf718c0b 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -400,6 +400,18 @@ tests = [ testGroup "block elements"
, " Para 2.1 | Para 2.2"
, " |+ Table 1 +|"
]
+ , "table with one column" =:
+ let headers = []
+ rows = [[para "Para 1"]
+ ,[para "Para 2"]]
+ in simpleTable headers rows
+ =?>
+ unlines [ "+--------+"
+ , "| Para 1 |"
+ , "+--------+"
+ , "| Para 2 |"
+ , "+--------+"
+ ]
]
, "div with bullet list" =:
divWith nullAttr (bulletList [para "foo"]) =?>