aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Shared.hs
diff options
context:
space:
mode:
authordespresc <christian.j.j.despres@gmail.com>2020-03-28 19:06:16 -0400
committerdespresc <christian.j.j.despres@gmail.com>2020-04-15 23:03:22 -0400
commitf8ce38975b547fe7fc8c12ccee3a940b35d8b9cf (patch)
tree5fa2b0067146fa26a2a9b01e4f645784cd4eedb1 /src/Text/Pandoc/Shared.hs
parent7254a2ae0ba40b29c04b8924f27739614229432b (diff)
downloadpandoc-f8ce38975b547fe7fc8c12ccee3a940b35d8b9cf.tar.gz
Remove the onlySimpleCellBodies function from Shared
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r--src/Text/Pandoc/Shared.hs15
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)