Skip to content

Commit 1ad4a8b

Browse files
committed
fix: allow - and $ in map keys
1 parent 67e2a43 commit 1ad4a8b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

resl/src/string.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ pub(crate) fn parse(input: &mut StatefulInput) -> ModalResult<Expr> {
3232
pub(crate) fn parse_plain<'input>(
3333
input: &mut StatefulInput<'input, '_>,
3434
) -> ModalResult<&'input str> {
35-
take_while(1.., |c: char| c.is_alphanumeric() || c == '_').parse_next(input)
35+
take_while(1.., |c: char| {
36+
c.is_alphanumeric() || ['_', '-', '$'].contains(&c)
37+
})
38+
.parse_next(input)
3639
}

0 commit comments

Comments
 (0)