Skip to content

Commit 1f54e13

Browse files
committed
fix: allow - and $ in map keys
1 parent 9db524c commit 1f54e13

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

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)