Skip to content

Commit 4cbb857

Browse files
lu-zeroshssoichiro
andauthored
Restrict acceptable characters for placeholders
Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
1 parent 8fdcb82 commit 4cbb857

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tokenizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ fn get_ident_named_placeholder_token<'i>(input: &mut &'i str) -> Result<Token<'i
384384
}
385385

386386
fn get_braced_named_placeholder_token<'i>(input: &mut &'i str) -> Result<Token<'i>> {
387-
delimited('{', take_until(1.., '}'), '}')
387+
delimited('{', take_while(1.., |c: char| c.is_alphanumeric() || c == '_'), '}')
388388
.with_taken()
389389
.parse_next(input)
390390
.map(|(index, token)| {

0 commit comments

Comments
 (0)