Use headline instead of heading for section_end.

This should be more performant.
This commit is contained in:
Tom Alexander 2023-03-24 17:30:33 -04:00
parent 8013f127df
commit 7ab3df6938
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 2 additions and 2 deletions

View File

@ -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> {
let heading_matcher = parser_with_context!(heading)(context);
alt((recognize(heading_matcher), eof))(input)
let headline_matcher = parser_with_context!(headline)(context);
alt((recognize(headline_matcher), eof))(input)
}
fn heading<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Heading<'s>> {