The current problem is whitespace at the end of a list item should not be consumed.
This commit is contained in:
@@ -16,6 +16,7 @@ use crate::parser::util::start_of_line;
|
||||
use nom::branch::alt;
|
||||
use nom::bytes::complete::tag;
|
||||
use nom::character::complete::digit1;
|
||||
use nom::character::complete::line_ending;
|
||||
use nom::character::complete::one_of;
|
||||
use nom::character::complete::space0;
|
||||
use nom::combinator::eof;
|
||||
@@ -94,8 +95,8 @@ fn plain_list_item_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<
|
||||
let plain_list_item_matcher = parser_with_context!(plain_list_item)(context);
|
||||
let line_indented_lte_matcher = parser_with_context!(line_indented_lte)(context);
|
||||
alt((
|
||||
recognize(plain_list_item_matcher),
|
||||
line_indented_lte_matcher,
|
||||
recognize(tuple((line_ending, plain_list_item_matcher))),
|
||||
recognize(tuple((line_ending, line_indented_lte_matcher))),
|
||||
eof,
|
||||
))(input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user