diff --git a/build.rs b/build.rs index a6ad5423..af9f4308 100644 --- a/build.rs +++ b/build.rs @@ -71,7 +71,7 @@ use organic::parser::sexp::sexp_with_padding; fn is_expect_fail(name: &str) -> Option<&str> { match name { "drawer_drawer_with_headline_inside" => Some("Apparently lines with :end: become their own paragraph. This odd behavior needs to be investigated more."), - "element_container_priority_drawer_dynamic_block" => Some("Keyword needs to be implemented."), + // "element_container_priority_drawer_dynamic_block" => Some("Keyword needs to be implemented."), "element_container_priority_dynamic_block_dynamic_block" => Some("Keyword needs to be implemented."), "element_container_priority_footnote_definition_dynamic_block" => Some("Keyword needs to be implemented."), "element_container_priority_greater_block_dynamic_block" => Some("Keyword needs to be implemented."), diff --git a/src/parser/keyword.rs b/src/parser/keyword.rs index 971ab09a..a4188e7e 100644 --- a/src/parser/keyword.rs +++ b/src/parser/keyword.rs @@ -5,6 +5,7 @@ use nom::character::complete::line_ending; use nom::character::complete::space0; use nom::character::complete::space1; use nom::combinator::eof; +use nom::combinator::opt; use nom::combinator::recognize; use nom::sequence::tuple; @@ -22,8 +23,7 @@ pub fn keyword<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, tag("#+"), is_not(" \t\r\n:"), tag(":"), - space1, - is_not("\r\n"), + alt((recognize(tuple((space1, is_not("\r\n")))), space0)), alt((line_ending, eof)), )))(input)?; Ok((remaining, Keyword { source: rule }))