From fd9d08f9d6ac172b0d827150ec10bd95959a1f51 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 7 Oct 2018 10:20:14 -0700 Subject: Revert export of hasSimpleCells from T.P.Writers.Shared. This wasn't necessary. --- src/Text/Pandoc/Writers/Shared.hs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs index ed2c46d7b..a7bf30aaa 100644 --- a/src/Text/Pandoc/Writers/Shared.hs +++ b/src/Text/Pandoc/Writers/Shared.hs @@ -41,7 +41,6 @@ module Text.Pandoc.Writers.Shared ( , isDisplayMath , fixDisplayMath , unsmartify - , hasSimpleCells , gridTable , lookupMetaBool , lookupMetaBlocks @@ -55,7 +54,6 @@ module Text.Pandoc.Writers.Shared ( where import Prelude import Control.Monad (zipWithM) -import Data.Monoid (Any (..)) import Data.Aeson (FromJSON (..), Result (..), ToJSON (..), Value (Object), encode, fromJSON) import Data.Char (chr, ord, isAscii, isSpace) @@ -72,7 +70,6 @@ import Text.Pandoc.Pretty import Text.Pandoc.Shared (stringify) import Text.Pandoc.UTF8 (toStringLazy) import Text.Pandoc.XML (escapeStringForXML) -import Text.Pandoc.Walk (query) import Text.Printf (printf) -- | Create JSON value for template from a 'Meta' and an association list @@ -246,21 +243,6 @@ unsmartify opts ('\8216':xs) = '\'' : unsmartify opts xs unsmartify opts (x:xs) = x : unsmartify opts xs unsmartify _ [] = [] --- | True if block is a table that can be represented with --- one line per row. -hasSimpleCells :: Block -> Bool -hasSimpleCells (Table _caption _aligns _widths headers rows) = - all isSimpleCell (concat (headers:rows)) - where - isLineBreak LineBreak = Any True - isLineBreak _ = Any False - hasLineBreak = getAny . query isLineBreak - isSimpleCell [Plain ils] = not (hasLineBreak ils) - isSimpleCell [Para ils ] = not (hasLineBreak ils) - isSimpleCell [] = True - isSimpleCell _ = False -hasSimpleCells _ = False - gridTable :: Monad m => WriterOptions -> (WriterOptions -> [Block] -> m Doc) -- cgit v1.2.3