Open mnquintana opened 9 years ago
Hmmm, can't reproduce on Yosemite. I'll check again tomorrow at work on my Ubuntu.
This can be reproduced with the following
{
"foo": "ba8r"
}
Toggling "foo"
is fine, but the 8
in ba8r
breaks the invalid range and prevents this package from recognising it as a string. The same goes for anything that is potentially valid JSON syntax (e.g., ba{r
)
Use case: I started with a plain ol' JS object, which I then wanted to convert to a separate JSON file. My JS object used single quoted strings as values. When I copy it to the JSON file, I want to use toggle-quotes to convert all of these invalid single-quoted strings to valid double-quoted strings. However, this only works on keys, not values. toggle-quotes can toggle quotes normally on JSON keys, but can only toggle from double-quotes to single-quotes for JSON values - it can't toggle from single-quotes to double-quotes.
Steps to reproduce:
Ubuntu 14.04.1 LTS