aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-07-30 17:30:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-07-30 17:30:05 -0700
commit699dd6c36767e4a30ec90d7e93ba6e0bc07276c7 (patch)
tree21d6694c2189667cb14941213c07d6c533d4ef98
parentc7c766440333cf5a2a1d54fd366e5c9aa9cf780b (diff)
downloadpandoc-699dd6c36767e4a30ec90d7e93ba6e0bc07276c7.tar.gz
ConTeXt writer; don't use `== empty` with `Doc`, use `isEmpty`.
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 94afc6dc2..aa4c6ae5f 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -295,10 +295,10 @@ tableColToConTeXt tabl (align, width, blocks) = do
then empty
else "width=" <> braces (text (printf "%.2f\\textwidth" width))
let halign = alignToConTeXt align
- let options = (if keys == empty
+ let options = (if isEmpty keys
then empty
else brackets keys) <> space
- where keys = hcat $ intersperse "," $ filter (empty /=) [halign, colwidth]
+ where keys = hcat $ intersperse "," $ filter (not . isEmpty) [halign, colwidth]
tableCellToConTeXt tabl options cellContents
tableCellToConTeXt :: PandocMonad m => Tabl -> Doc -> Doc -> WM m Doc
@@ -482,13 +482,13 @@ sectionHeader (ident,classes,kvs) hdrLevel lst = do
let ident' = if null ident
then empty
else "reference=" <> braces (text (toLabel ident))
- let contents' = if contents == empty
+ let contents' = if isEmpty contents
then empty
else "title=" <> braces contents
- let options = if keys == empty || levelText == empty
+ let options = if isEmpty keys || isEmpty levelText
then empty
else brackets keys
- where keys = hcat $ intersperse "," $ filter (empty /=) [contents', ident']
+ where keys = hcat $ intersperse "," $ filter (not . isEmpty) [contents', ident']
let starter = if writerSectionDivs opts
then "\\start"
else "\\"