Skip to content

Commit

Permalink
Added cut() to localze function
Browse files Browse the repository at this point in the history
  • Loading branch information
89Q12 committed Jun 17, 2022
1 parent 7a11db6 commit 355163a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions askama_derive/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ fn quoted_ident(input: &str) -> IResult<&str, &str> {
}
#[cfg(feature = "localization")]
fn localize(i: &str) -> IResult<&str, Expr<'_>> {
let (tail, (_, _,message, attribute, args, _)) = tuple((
let (tail, (_, _,message, attribute, args, _)) = cut(tuple((
tag("localize"),
ws(tag("(")),
quoted_ident,
Expand All @@ -693,7 +693,7 @@ fn localize(i: &str) -> IResult<&str, Expr<'_>> {
separated_list0(ws(tag(",")), tuple((identifier, ws(tag(":")), expr_any))),
))),
ws(tag(")")),
))(i)?;
)))(i)?;
Ok((
tail,
Expr::Localize(
Expand Down

0 comments on commit 355163a

Please sign in to comment.