Skip to content

Commit

Permalink
Allow escaped forward slash to conform with ZSON spec (#2697)
Browse files Browse the repository at this point in the history
Closes #2604.
  • Loading branch information
mccanne committed May 11, 2021
1 parent ff45c9d commit 3dcb327
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion zson/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (l *Lexer) scanString() (string, error) {
}
//XXX what about \u{}
switch c {
case '"', '\\': // nothing
case '"', '\\', '/': // nothing

case 'b':
c = '\b'
Expand Down
7 changes: 7 additions & 0 deletions zson/ztests/escaped-slash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
zed: "*"

input: |
{s:"1:foo\/bar"}
output: |
{s:"1:foo/bar"}

0 comments on commit 3dcb327

Please sign in to comment.