Commit 0b81963
committed
fix: handle escaped backslashes before quotes in JSONC parser
The previous check only looked at one preceding character, failing
for cases like "test\\" where \\ is an escaped backslash and
the final " is the real closing quote.
Now counts consecutive backslashes - even count means quote is real,
odd count means quote is escaped.1 parent 38bf301 commit 0b81963
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
19 | 30 | | |
20 | 31 | | |
21 | 32 | | |
| |||
0 commit comments