Moving towards unifying into a single parameterized element matcher.

This is to give paragraph priority over keyword in parsing so that affiliated keywords for paragraphs will be parsed as such.
This commit is contained in:
Tom Alexander
2023-04-22 00:55:31 -04:00
parent fef5841713
commit 4ac6d89311
8 changed files with 81 additions and 99 deletions

View File

@@ -54,7 +54,7 @@ pub fn drawer<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str,
exit_matcher: &drawer_end,
}));
let element_matcher = parser_with_context!(element)(&parser_context);
let element_matcher = parser_with_context!(element(true))(&parser_context);
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
let (remaining, children) = match consumed(many_till(blank_line, exit_matcher))(remaining) {
Ok((remaining, (whitespace, (_children, _exit_contents)))) => (