Get tracing back into the element parser.
This commit is contained in:
parent
f70babdcf4
commit
0b3f414ecf
@ -33,7 +33,15 @@ use nom::multi::many0;
|
||||
pub fn element(
|
||||
can_be_paragraph: bool,
|
||||
) -> impl for<'r, 's> Fn(Context<'r, 's>, &'s str) -> Res<&'s str, Element<'s>> {
|
||||
move |context: Context, input: &str| {
|
||||
move |context: Context, input: &str| _element(context, input, can_be_paragraph)
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
fn _element<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
can_be_paragraph: bool,
|
||||
) -> Res<&'s str, Element<'s>> {
|
||||
let plain_list_matcher = parser_with_context!(plain_list)(context);
|
||||
let greater_block_matcher = parser_with_context!(greater_block)(context);
|
||||
let dynamic_block_matcher = parser_with_context!(dynamic_block)(context);
|
||||
@ -100,4 +108,3 @@ pub fn element(
|
||||
|
||||
Ok((remaining, element))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user