Closed flyinbutrs closed 1 year ago
Fun bug! Of course the backslash does not affect the functionality, but it is foolish and unnecessary. The offending line is:
when String,Integer then "#{indent}#{o.inspect}"
I'll have to treat Strings with a better escaping mechanism that does only the minimum necessary. Thanks for the report.
If I have a JSON like the following:
{
"name": "\#channel"
}
I will get an invalid JSON. Refer to https://jsonlint.com/, and such JSON files cannot be parsed if you try to read them.
Input:
Pry log of failure:
When outputting the test file with native to_json, the # isn't escaped. When outputting using neat_generate, it is.