diff options
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) |