Fix problem with detecting end of plain list item.
The problem is line indented lte does not match because we aren't consuming the whitespace that the plain list would consume.
This commit is contained in:
parent
be64eb92af
commit
412bdcda28
@ -28,6 +28,8 @@ use nom::combinator::recognize;
|
||||
use nom::combinator::verify;
|
||||
use nom::multi::many1;
|
||||
use nom::multi::many_till;
|
||||
use nom::sequence::preceded;
|
||||
use nom::sequence::terminated;
|
||||
use nom::sequence::tuple;
|
||||
use tracing::span;
|
||||
|
||||
@ -180,11 +182,16 @@ pub fn plain_list_item<'r, 's>(
|
||||
}
|
||||
Err(_) => {
|
||||
let (remaining, _ws) = space1(remaining)?;
|
||||
let (remaining, (mut contents, (final_element, _exit_contents))) =
|
||||
many_till(
|
||||
with_consume_matcher,
|
||||
tuple((without_consume_matcher, exit_matcher)),
|
||||
)(remaining)?;
|
||||
let (remaining, (mut contents, final_element)) = many_till(
|
||||
with_consume_matcher,
|
||||
alt((
|
||||
terminated(without_consume_matcher, exit_matcher),
|
||||
preceded(
|
||||
peek(tuple((with_consume_matcher, exit_matcher))),
|
||||
without_consume_matcher,
|
||||
),
|
||||
)),
|
||||
)(remaining)?;
|
||||
contents.push(final_element);
|
||||
let source = get_consumed(input, remaining);
|
||||
return Ok((
|
||||
|
Loading…
x
Reference in New Issue
Block a user