|
|
|
@ -72,13 +72,6 @@ fn element_trailing_whitespace<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, O
|
|
|
|
|
alt((eof, recognize(many0(blank_line))))(input)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
|
|
|
|
fn element_trailing_whitespace_mid_line<'s>(
|
|
|
|
|
input: OrgSource<'s>,
|
|
|
|
|
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
|
|
|
|
alt((eof, recognize(many0(blank_line))))(input)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg_attr(
|
|
|
|
|
feature = "tracing",
|
|
|
|
|
tracing::instrument(ret, level = "debug", skip(context))
|
|
|
|
@ -121,22 +114,6 @@ pub(crate) fn maybe_consume_trailing_whitespace_if_not_exiting<'b, 'g, 'r, 's>(
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg_attr(
|
|
|
|
|
feature = "tracing",
|
|
|
|
|
tracing::instrument(ret, level = "debug", skip(context))
|
|
|
|
|
)]
|
|
|
|
|
pub(crate) fn maybe_consume_trailing_whitespace_if_not_exiting_mid_line<'b, 'g, 'r, 's>(
|
|
|
|
|
context: RefContext<'b, 'g, 'r, 's>,
|
|
|
|
|
input: OrgSource<'s>,
|
|
|
|
|
) -> Res<OrgSource<'s>, Option<OrgSource<'s>>> {
|
|
|
|
|
if context.should_consume_trailing_whitespace() && exit_matcher_parser(context, input).is_err()
|
|
|
|
|
{
|
|
|
|
|
Ok(opt(element_trailing_whitespace_mid_line)(input)?)
|
|
|
|
|
} else {
|
|
|
|
|
Ok((input, None))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg_attr(
|
|
|
|
|
feature = "tracing",
|
|
|
|
|
tracing::instrument(ret, level = "debug", skip(context))
|
|
|
|
|