The current problem is whitespace at the end of a list item should not be consumed.

This commit is contained in:
Tom Alexander
2023-03-27 18:50:25 -04:00
parent 3d8fe253c9
commit 3643f91bac
2 changed files with 11 additions and 3 deletions

View File

@@ -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)
}