sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

Show query diagnostics for unrecognized escape sequences in quoted strings #19469

Open rvantonder opened 3 years ago

rvantonder commented 3 years ago

Users may be confused when a query like content:"\Path\With\Backslash" gives an error saying "unrecognized escape sequence". Since \ is reserved for escaping in quoted strings, \ must itself be escaped. This is something we can add diagnostics for (yellow squiggles) in the frontend.

github-actions[bot] commented 3 years ago

Heads up @lguychard - the "team/search" label was applied to this issue.

fkling commented 2 years ago

@rvantonder Which escape sequences are valid? Only \" and \\?