diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-19 14:45:15 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-19 14:45:15 -0800 |
commit | 61f3db612cb0d84663499c6b9165f2a93fcc5e52 (patch) | |
tree | 01b3494a30dc0a6acc3f599409da3011a608be45 /src/Text | |
parent | 3442df88bd8a4a923f87ccbba90c3f24898e9d83 (diff) | |
download | pandoc-61f3db612cb0d84663499c6b9165f2a93fcc5e52.tar.gz |
Parsing: Rewrote spaceChar for significant speedup in readers.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index ce74a4dde..e283c209d 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -120,7 +120,7 @@ oneOfStrings listOfStrings = choice $ map (try . string) listOfStrings -- | Parses a space or tab. spaceChar :: CharParser st Char -spaceChar = char ' ' <|> char '\t' +spaceChar = satisfy $ \c -> c == ' ' || c == '\t' -- | Skips zero or more spaces or tabs. skipSpaces :: GenParser Char st () |