aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-01 22:09:45 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-01 22:09:45 -0700
commit963ba931a6a4450242fc5dd19f37813f09939c4f (patch)
tree1b80a09b983837209ea5018df8eae26f711e7fd3 /src
parent799cd5db7a52573fff305a88196c4e7fd8dd0567 (diff)
downloadpandoc-963ba931a6a4450242fc5dd19f37813f09939c4f.tar.gz
Moved isArgTok to Readers.LaTeX.Parsing.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs7
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]))