Do not consume space in time rest when leading into a repeater or delay.
This commit is contained in:
parent
ece8fcd0c4
commit
17e523b74c
@ -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> {
|
fn active_time_rest_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
||||||
alt((
|
alt((
|
||||||
recognize(verify(anychar, |c| ">\n".contains(*c))),
|
recognize(verify(anychar, |c| ">\n".contains(*c))),
|
||||||
parser_with_context!(repeater)(context),
|
recognize(tuple((space1, parser_with_context!(repeater)(context)))),
|
||||||
parser_with_context!(warning_delay)(context),
|
recognize(tuple((
|
||||||
|
space1,
|
||||||
|
parser_with_context!(warning_delay)(context),
|
||||||
|
))),
|
||||||
))(input)
|
))(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,8 +313,11 @@ fn inactive_time_rest_end<'r, 's>(
|
|||||||
) -> Res<&'s str, &'s str> {
|
) -> Res<&'s str, &'s str> {
|
||||||
alt((
|
alt((
|
||||||
recognize(verify(anychar, |c| "]\n".contains(*c))),
|
recognize(verify(anychar, |c| "]\n".contains(*c))),
|
||||||
parser_with_context!(repeater)(context),
|
recognize(tuple((space1, parser_with_context!(repeater)(context)))),
|
||||||
parser_with_context!(warning_delay)(context),
|
recognize(tuple((
|
||||||
|
space1,
|
||||||
|
parser_with_context!(warning_delay)(context),
|
||||||
|
))),
|
||||||
))(input)
|
))(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user