diff --git a/src/parser/document.rs b/src/parser/document.rs index bf5b726..b6eb652 100644 --- a/src/parser/document.rs +++ b/src/parser/document.rs @@ -129,7 +129,7 @@ fn section<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Sec #[tracing::instrument(ret, level = "debug")] fn section_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> { let headline_matcher = parser_with_context!(headline)(context); - alt((recognize(headline_matcher), eof))(input) + recognize(headline_matcher)(input) } #[tracing::instrument(ret, level = "debug")] @@ -181,5 +181,5 @@ fn headline<'r, 's>( #[tracing::instrument(ret, level = "debug")] fn headline_end<'r, 's>(_context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> { - alt((line_ending, eof))(input) + line_ending(input) }