Skip to content

Fix Safari RegExp support

Administrator requested to merge code-insights/count-filter-safari-fix into main

Created by: vovakulikov

For cathing count: filter in insight creation UI query input we use the follow regexp

/(?<!\s["'])count:(\s*)\d+\b(?!(\s*)["'])/gi

But Safari doesn't support a look behind groups in regexp expression and that leads us to a syntax error that completely breaks the app with invalid group specifier name error

Reminder: as soon this PR is merged we have to update the search-based insight extension according to these PR changes.

Knowing issues

Due to the fact that we have to come up with a similar solution in search based insight extension we can't use query parsers from sourcegraph/sourcegraph repo here and therefore can't support count filter quoted case

Example: testquery "count:99" in this example, our regexp still treat the search term "count:99" as a count filter which is not

Merge request reports

Loading