bhollis / jsonview

A web extension that helps you view JSON documents in the browser.
http://jsonview.com
MIT License
1.53k stars 227 forks source link

Fix JSON Mime type regex #204

Closed asgorobets closed 1 year ago

asgorobets commented 1 year ago

I think in https://github.com/bhollis/jsonview/pull/195 the mime-type regex got broken and no longer supports application/whatever+json format (despite it being claimed in comments above the code)

The reason I suspect is due to wrong regex capturing group where character class was removed ([abc] aka match any in [] brackets)

This is an attempt to fix it

See https://regex101.com/r/EwGGRb/1 for a quick test of new regex

bhollis commented 1 year ago

Thanks for finding that. I'll merge after I've written some tests for this bit.