aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-08-10 18:13:38 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-08-10 18:13:38 -0700
commit9152fa1a95346e26bc290b3f5018b2eeb5d4e077 (patch)
treeb8bd47cb2cc6621c19b4f808aa9898dd7b8490af /src/Text/Pandoc/Writers
parent210d7b7bce32d6160fbfd558ddab921f8c3506cb (diff)
downloadpandoc-9152fa1a95346e26bc290b3f5018b2eeb5d4e077.tar.gz
Use query instead of queryWith.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs4
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 40dc1deb5..0379f8b0a 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -33,7 +33,7 @@ import Text.Pandoc.Definition
import Text.Pandoc.Shared
import Text.Pandoc.Writers.Shared
import Text.Pandoc.Options
-import Text.Pandoc.Generic (queryWith)
+import Text.Pandoc.Walk (query)
import Text.Printf ( printf )
import Data.List ( intercalate, isPrefixOf )
import Control.Monad.State
@@ -326,7 +326,7 @@ inlineToConTeXt (Note contents) = do
contents' <- blockListToConTeXt contents
let codeBlock x@(CodeBlock _ _) = [x]
codeBlock _ = []
- let codeBlocks = queryWith codeBlock contents
+ let codeBlocks = query codeBlock contents
return $ if null codeBlocks
then text "\\footnote{" <> nest 2 contents' <> char '}'
else text "\\startbuffer " <> nest 2 contents' <>
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index d09ccc3b8..860ca8349 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -30,6 +30,7 @@ Conversion of 'Pandoc' format into LaTeX.
-}
module Text.Pandoc.Writers.LaTeX ( writeLaTeX ) where
import Text.Pandoc.Definition
+import Text.Pandoc.Walk
import Text.Pandoc.Generic
import Text.Pandoc.Shared
import Text.Pandoc.Writers.Shared
@@ -86,7 +87,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
-- see if there are internal links
let isInternalLink (Link _ ('#':xs,_)) = [xs]
isInternalLink _ = []
- modify $ \s -> s{ stInternalLinks = queryWith isInternalLink blocks }
+ modify $ \s -> s{ stInternalLinks = query isInternalLink blocks }
let template = writerTemplate options
-- set stBook depending on documentclass
let bookClasses = ["memoir","book","report","scrreprt","scrbook"]
@@ -248,9 +249,9 @@ elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts)
let hasCode (Code _ _) = [True]
hasCode _ = []
opts <- gets stOptions
- let fragile = not $ null $ queryWith hasCodeBlock elts ++
+ let fragile = not $ null $ query hasCodeBlock elts ++
if writerListings opts
- then queryWith hasCode elts
+ then query hasCode elts
else []
let allowframebreaks = "allowframebreaks" `elem` classes
let optionslist = ["fragile" | fragile] ++