git.iko.soy/typeable/pandoc
on master help sign in
Moved isArgTok to Readers.LaTeX.Parsing.
963ba93John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs−4
@@ -1533,10 +1533,6 @@ argspecPattern =
1533 (toktype' == Symbol || toktype' == Word) &&
1533 (toktype' == Symbol || toktype' == Word) &&
1534 (txt /= "{" && txt /= "\\" && txt /= "}")))
1534 (txt /= "{" && txt /= "\\" && txt /= "}")))
1535
1535
1536−isArgTok :: Tok -> Bool
1537−isArgTok (Tok _ (Arg _) _) = True
1538−isArgTok _ = False
1539−
1540newcommand :: PandocMonad m => LP m (Text, Macro)
1536newcommand :: PandocMonad m => LP m (Text, Macro)
1541newcommand = do
1537newcommand = do
1542 pos <- getPosition
1538 pos <- getPosition
src/Text/Pandoc/Readers/LaTeX/Parsing.hs+6−1
@@ -52,8 +52,9 @@ module Text.Pandoc.Readers.LaTeX.Parsing
52 , setpos
52 , setpos
53 , anyControlSeq
53 , anyControlSeq
54 , anySymbol
54 , anySymbol
55− , isWordTok
56 , isNewlineTok
55 , isNewlineTok
56+ , isWordTok
57+ , isArgTok
57 , spaces
58 , spaces
58 , spaces1
59 , spaces1
59 , tokTypeIn
60 , tokTypeIn
@@ -476,6 +477,10 @@ isWordTok :: Tok -> Bool
476isWordTok (Tok _ Word _) = True
477isWordTok (Tok _ Word _) = True
477isWordTok _ = False
478isWordTok _ = False
478
479
480+isArgTok :: Tok -> Bool
481+isArgTok (Tok _ (Arg _) _) = True
482+isArgTok _ = False
483+
479spaces :: PandocMonad m => LP m ()
484spaces :: PandocMonad m => LP m ()
480spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline]))
485spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline]))
481
486