Skip to content

search: fix quote parsing for standard queries

Administrator requested to merge backend-integration/rvt/fix-interr into main

Created by: rvantonder

There's a bug that causes patterntype:standard to parse quoted strings when it should continue to treat them literally (overlooked in https://github.com/sourcegraph/sourcegraph/pull/37656). The behavior is not live yet, but needs to be changed before merging https://github.com/sourcegraph/sourcegraph/pull/38141.

This PR just rewrites the existing logic to separate "parse /.../" and "parse " " or ' '" and then calls the right parser depending on Standard vs Regexp. This code is tested to heck and back, so don't worry too much about the rewriting.

Test plan

Added test.

Merge request reports

Loading