search only file contents for structural search
Created by: rvantonder
Structural search should only run on "file" (content) type. Before this change, an error would appear when searching repos for a pattern that is interpreted as regex but isn't, particularly when the structural search pattern is malformed (missing ]
):
This PR results in "No results". There may be ways to make the error more helpful (malformed structural syntax pattern), but I'd like to get this fix in ASAP.
Testing: verified manually. This happens in the hard-to-test doResults
function, so unit test is difficult unless we restructure. This change isn't big enough to warrant an e2e test IMO.