From 7ab3df69385389ed0e02c2bf70658c0a4b38126c Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 24 Mar 2023 17:30:33 -0400 Subject: [PATCH] Use headline instead of heading for section_end. This should be more performant. --- src/parser/document.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser/document.rs b/src/parser/document.rs index 7127f3cb..eeed9c53 100644 --- a/src/parser/document.rs +++ b/src/parser/document.rs @@ -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>> {