warrenday / graphql-network-inspector

A better network inspector for viewing and debugging GraphQL requests.
MIT License
466 stars 46 forks source link

Searching for scientific-notation numbers does not produce hits #114

Open Epigene opened 9 months ago

Epigene commented 9 months ago

Describe the bug Searching for scientific notation numbers does not produce any hits, but does highlight any matches. For example, we have a response that returns 7e-7 (equivalent to 0.0000007) and this is what I see: secret_hit

Curiously, searching for the "normal form" of the number produces hits, but not highlight: hits

As far as I can tell, 7e-7 is a valid JSON number

JSON('{"i": 7e-7}')
=> {"i"=>7.0e-07}

To Reproduce Tough to say, you'll have to set up a response with scientific-notation number value(s).

Expected behavior Searching for "7e-7" etc. should produce hit(s) below the search bar like for any other search term.
Alternatively, maybe display the "normal form", aligning both UI and search-term representation.

Desktop:

warrenday commented 8 months ago

Could be something to do with regex being triggered. I'll take a look.