diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-01 22:09:45 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-01 22:09:45 -0700 |
commit | 963ba931a6a4450242fc5dd19f37813f09939c4f (patch) | |
tree | 1b80a09b983837209ea5018df8eae26f711e7fd3 /src | |
parent | 799cd5db7a52573fff305a88196c4e7fd8dd0567 (diff) | |
download | pandoc-963ba931a6a4450242fc5dd19f37813f09939c4f.tar.gz |
Moved isArgTok to Readers.LaTeX.Parsing.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 7 |
2 files changed, 6 insertions, 5 deletions
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])) |