Use headline instead of heading for section_end.
This should be more performant.
This commit is contained in:
parent
8013f127df
commit
7ab3df6938
@ -93,8 +93,8 @@ fn section<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Sec
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn section_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
fn section_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
||||||
let heading_matcher = parser_with_context!(heading)(context);
|
let headline_matcher = parser_with_context!(headline)(context);
|
||||||
alt((recognize(heading_matcher), eof))(input)
|
alt((recognize(headline_matcher), eof))(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn heading<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Heading<'s>> {
|
fn heading<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Heading<'s>> {
|
||||||
|
Loading…
Reference in New Issue
Block a user