@@ -40,6 +40,7 @@ module Text.Pandoc.Parsing ( takeWhileP,
40 anyLineNewline,
40 anyLineNewline,
41 indentWith,
41 indentWith,
42 many1Till,
42 many1Till,
43 notFollowedBy',
44 notFollowedBy',
44 oneOfStrings,
45 oneOfStrings,
45 oneOfStringsCI,
46 oneOfStringsCI,
@@ -325,6 +326,20 @@ many1Till p end = do
325 rest <- manyTill p end
326 rest <- manyTill p end
326 return (first:rest)
327 return (first:rest)
329+-- | Like @manyTill@, but also returns the result of end parser.
330+manyUntil :: (Stream s m t)
333+ -> ParserT s u m ([a], b)
334+manyUntil p end = scan
328-- | A more general form of @notFollowedBy@. This one allows any
343-- | A more general form of @notFollowedBy@. This one allows any
329-- type of parser to be specified, and succeeds only if that parser fails.
344-- type of parser to be specified, and succeeds only if that parser fails.
330-- It does not consume any input.
345-- It does not consume any input.