Remove unnecessary context from some util functions.
This commit is contained in:
@@ -39,7 +39,7 @@ pub fn footnote_definition<'r, 's>(
|
||||
"Cannot nest objects of the same element".into(),
|
||||
))));
|
||||
}
|
||||
start_of_line(context, input)?;
|
||||
start_of_line(input)?;
|
||||
// Cannot be indented.
|
||||
let (remaining, (_lead_in, lbl, _lead_out, _ws)) =
|
||||
tuple((tag_no_case("[fn:"), label, tag("]"), space0))(input)?;
|
||||
@@ -80,7 +80,6 @@ fn footnote_definition_end<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
let start_of_line_matcher = parser_with_context!(start_of_line)(context);
|
||||
let allow_nesting_context =
|
||||
context.with_additional_node(ContextElement::Context("allow nesting footnotes"));
|
||||
let footnote_definition_matcher = parser_with_context!(footnote_definition)(
|
||||
@@ -98,7 +97,7 @@ fn footnote_definition_end<'r, 's>(
|
||||
footnote_definition_matcher,
|
||||
))),
|
||||
recognize(tuple((
|
||||
start_of_line_matcher,
|
||||
start_of_line,
|
||||
verify(many1(blank_line), |lines: &Vec<OrgSource<'_>>| {
|
||||
lines.len() >= 2
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user