diff options
Diffstat (limited to 'src/Text/Pandoc/Writers/Muse.hs')
| -rw-r--r-- | src/Text/Pandoc/Writers/Muse.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 3b01d2a12..47a5e55ad 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -265,12 +265,15 @@ blockToMuse (Header level (ident,_,_) inlines) = do return $ blankline <> attr' $$ nowrap (header' <> contents) <> blankline -- https://www.gnu.org/software/emacs-muse/manual/muse.html#Horizontal-Rules-and-Anchors blockToMuse HorizontalRule = return $ blankline $$ "----" $$ blankline -blockToMuse (Table _ blkCapt specs thead tbody tfoot) = +blockToMuse (Table _ blkCapt specs thead@(TableHead hattr hrows) tbody tfoot) = if isSimple && numcols > 1 then simpleTable caption headers rows else do opts <- asks envOptions - gridTable opts blocksToDoc True (map (const AlignDefault) aligns) widths headers rows + let tbody' = case hrows of + [] -> tbody + _ -> TableBody nullAttr 0 [] hrows : tbody + gridTable opts blocksToDoc specs (TableHead hattr []) tbody' tfoot where (caption, aligns, widths, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot blocksToDoc opts blocks = |
