Do not consume space in time rest when leading into a repeater or delay.

This commit is contained in:
Tom Alexander 2023-07-27 20:39:13 -04:00
parent ece8fcd0c4
commit 17e523b74c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -298,8 +298,11 @@ fn time_rest<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &
fn active_time_rest_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
alt((
recognize(verify(anychar, |c| ">\n".contains(*c))),
parser_with_context!(repeater)(context),
parser_with_context!(warning_delay)(context),
recognize(tuple((space1, parser_with_context!(repeater)(context)))),
recognize(tuple((
space1,
parser_with_context!(warning_delay)(context),
))),
))(input)
}
@ -310,8 +313,11 @@ fn inactive_time_rest_end<'r, 's>(
) -> Res<&'s str, &'s str> {
alt((
recognize(verify(anychar, |c| "]\n".contains(*c))),
parser_with_context!(repeater)(context),
parser_with_context!(warning_delay)(context),
recognize(tuple((space1, parser_with_context!(repeater)(context)))),
recognize(tuple((
space1,
parser_with_context!(warning_delay)(context),
))),
))(input)
}