A new commit was made to the ParseJS repository, it contains an update that will prevent smaller tokens from potentially wrongfully being placed.
This is the bug in question:
parse_string("Hello, world!", ["Hell", "Hello"]);
// Produces: [Symbol(Hell), 'o', ',', ' ', 'w', ...]
// But, this--
parse_string("Hello, world!", ["Hello", "Hell"]);
// -- produces: [Symbol(Hello), ',', ' ', 'w', 'o', 'r', ...]
Now, in this update, the order won't matter, the longer token is always chosen if it can be.
Top comments (0)