Fix requiring no space between comment and property drawer for zeroth section.

This commit is contained in:
Tom Alexander
2023-04-19 19:22:23 -04:00
parent 603cc131a0
commit 4e65d2cda9
2 changed files with 13 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
use nom::branch::alt;
use nom::bytes::complete::tag;
use nom::bytes::complete::tag_no_case;
use nom::bytes::complete::take_while;
use nom::character::complete::line_ending;
use nom::character::complete::space0;
@@ -92,7 +93,7 @@ fn drawer_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str,
start_of_line(context, input)?;
recognize(tuple((
space0,
tag(":end:"),
tag_no_case(":end:"),
space0,
alt((line_ending, eof)),
)))(input)