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(
|
pub fn element(
|
||||||
can_be_paragraph: bool,
|
can_be_paragraph: bool,
|
||||||
) -> impl for<'r, 's> Fn(Context<'r, 's>, &'s str) -> Res<&'s str, Element<'s>> {
|
) -> 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 plain_list_matcher = parser_with_context!(plain_list)(context);
|
||||||
let greater_block_matcher = parser_with_context!(greater_block)(context);
|
let greater_block_matcher = parser_with_context!(greater_block)(context);
|
||||||
let dynamic_block_matcher = parser_with_context!(dynamic_block)(context);
|
let dynamic_block_matcher = parser_with_context!(dynamic_block)(context);
|
||||||
@ -99,5 +107,4 @@ pub fn element(
|
|||||||
element.set_source(source);
|
element.set_source(source);
|
||||||
|
|
||||||
Ok((remaining, element))
|
Ok((remaining, element))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user