Skip to content

Commit 5c37ab4

Browse files
committed
Disallow escaped forward slash
Updated ABNF and tests
1 parent a3ea77b commit 5c37ab4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spec/v0.1/maml.abnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ integer = "0" / ( onenine *DIGIT )
3939
quote = %x22
4040

4141
char = %x20-21 / %x23-5B / %x5D-10FFFF
42-
char =/ %x5C ( %x5C / quote / "/" / "n" / "r" / "t" / "u" "{" 1*6HEXDIG "}" )
42+
char =/ %x5C ( %x5C / quote / "n" / "r" / "t" / "u" "{" 1*6HEXDIG "}" )
4343

4444
comment = "#" *non-eol
4545

spec/v0.1/maml.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ describe('MAML v0.1', () => {
123123
parse(`"\\""`)
124124
parse(`"\\u{10FFFF}"`)
125125

126-
expect(() => parse(`"\\`)).toThrow()
126+
expect(() => parse(`"\\"`)).toThrow()
127+
expect(() => parse(`"\\/"`)).toThrow()
127128
expect(() => parse(`"\n"`)).toThrow()
128129
expect(() => parse(`"\\u0000"`)).toThrow()
129130
expect(() => parse(`"\\u{G}"`)).toThrow()

0 commit comments

Comments
 (0)