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> {
|
||||
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>> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user