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
1 changed files with 6 additions and 2 deletions

View File

@ -37,9 +37,13 @@ pub fn detect_plain_list<'r, 's>(
_context: Context<'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, ()> {
// TODO: Add support for plain list items that do not have content on the first line.
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)| {
Into::<&str>::into(bull) != "*" || indent.len() > 0
},