Update detect_plain_list to support line breaks.

This commit is contained in:
Tom Alexander 2023-08-25 05:20:13 -04:00
parent bc5745a95f
commit bfea828e62
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -37,9 +37,13 @@ pub fn detect_plain_list<'r, 's>(
_context: Context<'r, 's>, _context: Context<'r, 's>,
input: OrgSource<'s>, input: OrgSource<'s>,
) -> Res<OrgSource<'s>, ()> { ) -> Res<OrgSource<'s>, ()> {
// TODO: Add support for plain list items that do not have content on the first line.
if verify( if verify(
tuple((start_of_line, space0, bullet, space1)), tuple((
start_of_line,
space0,
bullet,
alt((space1, line_ending, eof)),
)),
|(_start, indent, bull, _after_whitespace)| { |(_start, indent, bull, _after_whitespace)| {
Into::<&str>::into(bull) != "*" || indent.len() > 0 Into::<&str>::into(bull) != "*" || indent.len() > 0
}, },