Fix invalid indices when content is not long enough
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
fa1582f3ad
commit
462355b6f2
4 changed files with 25 additions and 7 deletions
|
|
@ -383,10 +383,10 @@ fn parse_block_token<'input>(input: &mut Input<'input>) -> PResult<'input, Templ
|
|||
"parse_block_token",
|
||||
alt((
|
||||
parse_ident,
|
||||
parse_literal,
|
||||
parse_condition_if,
|
||||
parse_condition_else,
|
||||
parse_end,
|
||||
terminated(parse_literal, ident_terminator_check),
|
||||
terminated(parse_condition_if, ident_terminator_check),
|
||||
terminated(parse_condition_else, ident_terminator_check),
|
||||
terminated(parse_end, ident_terminator_check),
|
||||
parse_whitespace,
|
||||
)),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue