From 963ba931a6a4450242fc5dd19f37813f09939c4f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 1 Oct 2018 22:09:45 -0700 Subject: Moved isArgTok to Readers.LaTeX.Parsing. --- src/Text/Pandoc/Readers/LaTeX.hs | 4 ---- src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 816fa35de..7c5619165 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1533,10 +1533,6 @@ argspecPattern = (toktype' == Symbol || toktype' == Word) && (txt /= "{" && txt /= "\\" && txt /= "}"))) -isArgTok :: Tok -> Bool -isArgTok (Tok _ (Arg _) _) = True -isArgTok _ = False - newcommand :: PandocMonad m => LP m (Text, Macro) newcommand = do pos <- getPosition diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index 81d83dab2..9256217fe 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -52,8 +52,9 @@ module Text.Pandoc.Readers.LaTeX.Parsing , setpos , anyControlSeq , anySymbol - , isWordTok , isNewlineTok + , isWordTok + , isArgTok , spaces , spaces1 , tokTypeIn @@ -476,6 +477,10 @@ isWordTok :: Tok -> Bool isWordTok (Tok _ Word _) = True isWordTok _ = False +isArgTok :: Tok -> Bool +isArgTok (Tok _ (Arg _) _) = True +isArgTok _ = False + spaces :: PandocMonad m => LP m () spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline])) -- cgit v1.2.3