diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/CommonMark.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Muse.hs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/CommonMark.hs b/src/Text/Pandoc/Writers/CommonMark.hs index 585f7137e..bd798ee73 100644 --- a/src/Text/Pandoc/Writers/CommonMark.hs +++ b/src/Text/Pandoc/Writers/CommonMark.hs @@ -156,7 +156,7 @@ blockToNodes opts (DefinitionList items) ns = Para term : concat xs blockToNodes opts t@(Table _ blkCapt specs _ thead tbody tfoot) ns = let (capt, aligns, _widths, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot - in if isEnabled Ext_pipe_tables opts && onlySimpleTableCells (thead <> tbody <> tfoot) + in if isEnabled Ext_pipe_tables opts && onlySimpleTableCells (headers : rows) then do -- We construct a table manually as a CUSTOM_BLOCK, for -- two reasons: (1) cmark-gfm currently doesn't support diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 5501b49ee..4d4d02028 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -582,7 +582,7 @@ blockToMarkdown' opts t@(Table _ blkCapt specs _ thead tbody tfoot) = do let caption'' = if null caption || not (isEnabled Ext_table_captions opts) then blankline else blankline $$ (": " <> caption') $$ blankline - let hasSimpleCells = onlySimpleTableCells $ thead <> tbody <> tfoot + let hasSimpleCells = onlySimpleTableCells $ headers : rows let isSimple = hasSimpleCells && all (==0) widths let isPlainBlock (Plain _) = True isPlainBlock _ = False diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 8f672a8bd..f2bc91290 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -270,7 +270,7 @@ blockToMuse (Table _ blkCapt specs _ thead tbody tfoot) = blocksToDoc opts blocks = local (\env -> env { envOptions = opts }) $ blockListToMuse blocks numcols = maximum (length aligns : length widths : map length (headers:rows)) - isSimple = onlySimpleTableCells (thead <> tbody <> tfoot) && all (== 0) widths + isSimple = onlySimpleTableCells (headers : rows) && all (== 0) widths blockToMuse (Div _ bs) = flatBlockListToMuse bs blockToMuse Null = return empty |