Moved isArgTok to Readers.LaTeX.Parsing.
This commit is contained in:
parent
799cd5db7a
commit
963ba931a6
2 changed files with 6 additions and 5 deletions
|
@ -1533,10 +1533,6 @@ argspecPattern =
|
||||||
(toktype' == Symbol || toktype' == Word) &&
|
(toktype' == Symbol || toktype' == Word) &&
|
||||||
(txt /= "{" && txt /= "\\" && txt /= "}")))
|
(txt /= "{" && txt /= "\\" && txt /= "}")))
|
||||||
|
|
||||||
isArgTok :: Tok -> Bool
|
|
||||||
isArgTok (Tok _ (Arg _) _) = True
|
|
||||||
isArgTok _ = False
|
|
||||||
|
|
||||||
newcommand :: PandocMonad m => LP m (Text, Macro)
|
newcommand :: PandocMonad m => LP m (Text, Macro)
|
||||||
newcommand = do
|
newcommand = do
|
||||||
pos <- getPosition
|
pos <- getPosition
|
||||||
|
|
|
@ -52,8 +52,9 @@ module Text.Pandoc.Readers.LaTeX.Parsing
|
||||||
, setpos
|
, setpos
|
||||||
, anyControlSeq
|
, anyControlSeq
|
||||||
, anySymbol
|
, anySymbol
|
||||||
, isWordTok
|
|
||||||
, isNewlineTok
|
, isNewlineTok
|
||||||
|
, isWordTok
|
||||||
|
, isArgTok
|
||||||
, spaces
|
, spaces
|
||||||
, spaces1
|
, spaces1
|
||||||
, tokTypeIn
|
, tokTypeIn
|
||||||
|
@ -476,6 +477,10 @@ isWordTok :: Tok -> Bool
|
||||||
isWordTok (Tok _ Word _) = True
|
isWordTok (Tok _ Word _) = True
|
||||||
isWordTok _ = False
|
isWordTok _ = False
|
||||||
|
|
||||||
|
isArgTok :: Tok -> Bool
|
||||||
|
isArgTok (Tok _ (Arg _) _) = True
|
||||||
|
isArgTok _ = False
|
||||||
|
|
||||||
spaces :: PandocMonad m => LP m ()
|
spaces :: PandocMonad m => LP m ()
|
||||||
spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline]))
|
spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue