Ran into a bigger issue.
This commit is contained in:
parent
8549a6b0db
commit
be64eb92af
@ -58,6 +58,7 @@ pub fn plain_list<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s s
|
||||
Consume, additional item
|
||||
*/
|
||||
{
|
||||
// Don't consume, yes exit matcher
|
||||
let span = span!(tracing::Level::DEBUG, "first");
|
||||
let _enter = span.enter();
|
||||
|
||||
@ -76,6 +77,7 @@ pub fn plain_list<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s s
|
||||
}
|
||||
|
||||
{
|
||||
// Consume, additional item
|
||||
let span = span!(tracing::Level::DEBUG, "second");
|
||||
let _enter = span.enter();
|
||||
|
||||
@ -97,10 +99,10 @@ pub fn plain_list<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s s
|
||||
}
|
||||
|
||||
{
|
||||
// Don't consume, no additional item
|
||||
let span = span!(tracing::Level::DEBUG, "third");
|
||||
let _enter = span.enter();
|
||||
|
||||
// If its not (don't consume, exit) and its not (consume, see another item) then it must be (don't consume, no additional item)
|
||||
let last_item_then_exit = without_consume_matcher(remaining);
|
||||
match last_item_then_exit {
|
||||
Ok((remain, item))
|
||||
@ -157,7 +159,7 @@ pub fn plain_list_item<'r, 's>(
|
||||
}));
|
||||
|
||||
let with_consume_matcher = parser_with_context!(element)(&with_consume_context);
|
||||
let without_consume_matcher = parser_with_context!(element)(&with_consume_context);
|
||||
let without_consume_matcher = parser_with_context!(element)(&without_consume_context);
|
||||
let exit_matcher = parser_with_context!(exit_matcher_parser)(&with_consume_context);
|
||||
let (remaining, bull) =
|
||||
verify(bullet, |bull: &str| bull != "*" || indent_level > 0)(remaining)?;
|
||||
|
Loading…
Reference in New Issue
Block a user