Moved isArgTok to Readers.LaTeX.Parsing.
commit963ba931a6a4450242fc5dd19f37813f09939c4f
authorJohn MacFarlane <jgm@berkeley.edu>
dateMon 1 Oct 2018, 22:09 (8 years ago)
parent799cd5d
src/Text/Pandoc/Readers/LaTeX.hs−4
@@ -1533,10 +1533,6 @@ argspecPattern =
15331533 (toktype' == Symbol || toktype' == Word) &&
15341534 (txt /= "{" && txt /= "\\" && txt /= "}")))
15351535
1536−isArgTok :: Tok -> Bool
1537−isArgTok (Tok _ (Arg _) _) = True
1538−isArgTok _ = False
1539−
15401536newcommand :: PandocMonad m => LP m (Text, Macro)
15411537newcommand = do
15421538 pos <- getPosition
src/Text/Pandoc/Readers/LaTeX/Parsing.hs+6−1
@@ -52,8 +52,9 @@ module Text.Pandoc.Readers.LaTeX.Parsing
5252 , setpos
5353 , anyControlSeq
5454 , anySymbol
55− , isWordTok
5655 , isNewlineTok
56+ , isWordTok
57+ , isArgTok
5758 , spaces
5859 , spaces1
5960 , tokTypeIn
@@ -476,6 +477,10 @@ isWordTok :: Tok -> Bool
476477isWordTok (Tok _ Word _) = True
477478isWordTok _ = False
478479
480+isArgTok :: Tok -> Bool
481+isArgTok (Tok _ (Arg _) _) = True
482+isArgTok _ = False
483+
479484spaces :: PandocMonad m => LP m ()
480485spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline]))
481486