Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parser: Allow empty attributes in default parsers
Since the introduction of the default parser in #8083 we have had a subtle bug in the parsing which failed when empty attributes were specified in a block's comment delimiter - `{}` The absense of attributes was fine but _empty_ attributes were a failure. This is due to using `+?` in the RegExp tokenizer instead of using `*?` (which allows for no inner content in the JSON string). This patch updates the quantifier to restore functionality and fix the bug. This didn't appear in practice because we don't intentionally set `{}` as the attributes - the serializer drops it altogther, and our tests didn't catch it for similar reasons.
- Loading branch information