File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -384,18 +384,22 @@ fn get_ident_named_placeholder_token<'i>(input: &mut &'i str) -> Result<Token<'i
384384}
385385
386386fn get_braced_named_placeholder_token < ' i > ( input : & mut & ' i str ) -> Result < Token < ' i > > {
387- delimited ( '{' , take_until ( 1 .., '}' ) , '}' )
388- . with_taken ( )
389- . parse_next ( input)
390- . map ( |( index, token) | {
391- let index = Cow :: Borrowed ( index) ;
392- Token {
393- kind : TokenKind :: Placeholder ,
394- value : token,
395- key : Some ( PlaceholderKind :: Named ( index) ) ,
396- alias : token,
397- }
398- } )
387+ delimited (
388+ '{' ,
389+ take_while ( 1 .., |c : char | c. is_alphanumeric ( ) || c == '_' ) ,
390+ '}' ,
391+ )
392+ . with_taken ( )
393+ . parse_next ( input)
394+ . map ( |( index, token) | {
395+ let index = Cow :: Borrowed ( index) ;
396+ Token {
397+ kind : TokenKind :: Placeholder ,
398+ value : token,
399+ key : Some ( PlaceholderKind :: Named ( index) ) ,
400+ alias : token,
401+ }
402+ } )
399403}
400404
401405fn get_string_named_placeholder_token < ' i > (
You can’t perform that action at this time.
0 commit comments