Fix handling fixed width areas with empty lines in the middle.

This commit is contained in:
Tom Alexander 2023-12-15 19:17:16 -05:00
parent 99b74095e6
commit e846c85188
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,3 @@
: foo
:
: bar

View File

@ -72,8 +72,8 @@ where
fn fixed_width_area_line<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
start_of_line(input)?;
let (remaining, _) = tuple((space0, tag(":")))(input)?;
if let Ok((remain, _line_break)) = org_line_ending(remaining) {
return Ok((remain, remaining.take(0)));
if let Ok((_remain, _line_break)) = org_line_ending(remaining) {
return Ok((remaining, remaining.take(0)));
}
let (remaining, _) = tag(" ")(remaining)?;
let (remaining, value) = recognize(many_till(anychar, peek(org_line_ending)))(remaining)?;