Move the paragraph context into the paragraph parser.
This commit is contained in:
@@ -84,6 +84,8 @@ pub fn paragraph<'s, 'r>(
|
||||
i: &'s str,
|
||||
context: &'r OrgModeContext<'r>,
|
||||
) -> Res<&'s str, (Vec<TextElement<'s>>, &'s str)> {
|
||||
let text_element_parser = parser_with_context!(flat_text_element)(context);
|
||||
many_till(text_element_parser, paragraph_end)(i)
|
||||
let paragraph_context = context.with_additional_fail_matcher(¶graph_end);
|
||||
let text_element_parser = parser_with_context!(flat_text_element)(¶graph_context);
|
||||
let ret = many_till(text_element_parser, paragraph_end)(i);
|
||||
ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user