aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-07 10:20:14 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-07 10:20:14 -0700
commitfd9d08f9d6ac172b0d827150ec10bd95959a1f51 (patch)
treeb8ea6fd19087631473b7750940d75155117e58bf
parentbd8a66394bc25b52dca9ffd963a560a4ca492f9c (diff)
downloadpandoc-fd9d08f9d6ac172b0d827150ec10bd95959a1f51.tar.gz
Revert export of hasSimpleCells from T.P.Writers.Shared.
This wasn't necessary.
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs18
1 files changed, 0 insertions, 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)