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/Shared.hs | |
parent | 7254a2ae0ba40b29c04b8924f27739614229432b (diff) | |
download | pandoc-f8ce38975b547fe7fc8c12ccee3a940b35d8b9cf.tar.gz |
Remove the onlySimpleCellBodies function from Shared
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 846e7699c..0418aa6e2 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -67,7 +67,6 @@ module Text.Pandoc.Shared ( headerShift, stripEmptyParagraphs, onlySimpleTableCells, - onlySimpleCellBodies, isTightList, taskListItemFromAscii, taskListItemToAscii, @@ -669,18 +668,8 @@ stripEmptyParagraphs = walk go -- | Detect if table rows contain only cells consisting of a single -- paragraph that has no @LineBreak@. - --- TODO: should this become aware of cell dimensions? -onlySimpleTableCells :: [Row] -> Bool -onlySimpleTableCells = onlySimpleCellBodies . map unRow - where - unRow (Row _ body) = map unCell body - unCell (Cell _ _ _ _ body) = body - --- | Detect if unwrapped table rows contain only cells consisting of a --- single paragraph that has no @LineBreak@. -onlySimpleCellBodies :: [[[Block]]] -> Bool -onlySimpleCellBodies = all isSimpleCell . concat +onlySimpleTableCells :: [[[Block]]] -> Bool +onlySimpleTableCells = all isSimpleCell . concat where isSimpleCell [Plain ils] = not (hasLineBreak ils) isSimpleCell [Para ils ] = not (hasLineBreak ils) |