Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace stripJsonComments() trailing comma regexp
I realized after merging #11 that the regular expression at the end of stripJsonComments() would affect quoted strings. The new "stripJsonComments > doesn't modify > strings including trailing commas" test case confirmed this. The new algorithm took a bit of trial and error, and the existing tests really helped distill it to its essence. Quite happy with how it turned out. Also reorganized the test cases with more `describe` blocks. Added the new "maintains correct syntax error position info when..." suite to confirm positional info in JSON.parse errors remains correct.
- Loading branch information