From bc3224be7ae55fc7cf8f07984d0d2ab25d38d1f5 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 2 Oct 2023 19:09:20 -0400 Subject: [PATCH] Revert the rest_end functions. --- src/parser/timestamp.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/parser/timestamp.rs b/src/parser/timestamp.rs index f50b4b1..2fa5a04 100644 --- a/src/parser/timestamp.rs +++ b/src/parser/timestamp.rs @@ -483,18 +483,32 @@ fn time_rest<'b, 'g, 'r, 's>( #[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))] fn active_time_rest_end<'b, 'g, 'r, 's>( - _context: RefContext<'b, 'g, 'r, 's>, + context: RefContext<'b, 'g, 'r, 's>, input: OrgSource<'s>, ) -> Res, OrgSource<'s>> { - recognize(verify(anychar, |c| ">\n".contains(*c)))(input) + alt(( + recognize(verify(anychar, |c| ">\n".contains(*c))), + recognize(tuple((space1, parser_with_context!(repeater)(context)))), + recognize(tuple(( + space1, + parser_with_context!(warning_delay)(context), + ))), + ))(input) } #[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))] fn inactive_time_rest_end<'b, 'g, 'r, 's>( - _context: RefContext<'b, 'g, 'r, 's>, + context: RefContext<'b, 'g, 'r, 's>, input: OrgSource<'s>, ) -> Res, OrgSource<'s>> { - recognize(verify(anychar, |c| "]\n".contains(*c)))(input) + alt(( + recognize(verify(anychar, |c| "]\n".contains(*c))), + recognize(tuple((space1, parser_with_context!(repeater)(context)))), + recognize(tuple(( + space1, + parser_with_context!(warning_delay)(context), + ))), + ))(input) } #[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]