diff options
author | despresc <christian.j.j.despres@gmail.com> | 2020-03-28 19:06:16 -0400 |
---|---|---|
committer | despresc <christian.j.j.despres@gmail.com> | 2020-04-15 23:03:22 -0400 |
commit | f8ce38975b547fe7fc8c12ccee3a940b35d8b9cf (patch) | |
tree | 5fa2b0067146fa26a2a9b01e4f645784cd4eedb1 /src/Text/Pandoc/Writers | |
parent | 7254a2ae0ba40b29c04b8924f27739614229432b (diff) | |
download | pandoc-f8ce38975b547fe7fc8c12ccee3a940b35d8b9cf.tar.gz |
Remove the onlySimpleCellBodies function from Shared
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 |