Require either eof or whitespace to line ending for valueless items.
Some checks failed
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has failed

This commit is contained in:
Tom Alexander 2023-09-21 22:06:30 -04:00
parent f0a7493a89
commit 129228c5c5
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -188,9 +188,9 @@ fn plain_list_item<'b, 'g, 'r, 's>(
match maybe_contentless_item {
Ok((_rem, _ws)) => {
let (remaining, _trailing_ws) = if context.should_consume_trailing_whitespace() {
recognize(many0(blank_line))(remaining)?
recognize(alt((recognize(many1(blank_line)), eof)))(remaining)?
} else {
recognize(opt(blank_line))(remaining)?
recognize(alt((blank_line, eof)))(remaining)?
};
let source = get_consumed(input, remaining);
return Ok((