Added nonspaceChar to Text.Pandoc.Parsing.
This commit is contained in:
parent
264c5a4f6b
commit
2d14c9b436
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,7 @@ module Text.Pandoc.Parsing ( (>>~),
|
|||
notFollowedBy',
|
||||
oneOfStrings,
|
||||
spaceChar,
|
||||
nonspaceChar,
|
||||
skipSpaces,
|
||||
blankline,
|
||||
blanklines,
|
||||
|
@ -122,6 +123,10 @@ oneOfStrings listOfStrings = choice $ map (try . string) listOfStrings
|
|||
spaceChar :: CharParser st Char
|
||||
spaceChar = satisfy $ \c -> c == ' ' || c == '\t'
|
||||
|
||||
-- | Parses a nonspace, nonnewline character.
|
||||
nonspaceChar :: CharParser st Char
|
||||
nonspaceChar = satisfy $ \x -> x /= '\t' && x /= '\n' && x /= ' ' && x /= '\r'
|
||||
|
||||
-- | Skips zero or more spaces or tabs.
|
||||
skipSpaces :: GenParser Char st ()
|
||||
skipSpaces = skipMany spaceChar
|
||||
|
|
Loading…
Add table
Reference in a new issue