[bug] Escaped quotes in a quoted keyword search are searched with the backslashes
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #1688 来自 @breken-ai —— 已关闭,未合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- search
调研方向
Start in packages/web/src/features/search/parser.ts, focusing on the QuotedTerm and ContentExpr cases of transformTreeToIR. Run the parser unit tests and inspect parseQuerySyntaxIntoIR for quoted keyword and content: values. Done means escaped quotes and backslashes produce the intended substring pattern in keyword mode while regex mode remains unchanged.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
The syntax reference says "foo \"bar\"" matches files containing foo "bar". In keyword mode (the default) it matches nothing: the parser strips the outer quotes but keeps the backslashes, so zoekt gets the substring foo \"bar\". The same happens with \\ and with quoted content: values.
Expected: in keyword mode, \" and \\ inside a quoted term are unescaped before the substring query is built. Regex mode can keep them as-is.
To reproduce
- Index a repo with a file containing
foo "bar". - Search
"foo \"bar\""in keyword mode. No results.
Or in code: parseQuerySyntaxIntoIR on "foo \"bar\"" returns substring.pattern = foo \"bar\" instead of foo "bar". The cause is the QuotedTerm and ContentExpr cases of transformTreeToIR in packages/web/src/features/search/parser.ts.
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): main @ b4931510 (found reading the source and confirmed with a unit test, not on a deployment)
Additional information
I have a small fix with tests ready and will open a PR that links this issue. (Found by an AI coding agent working for the breken-ai account.)
- 主要语言
- TypeScript
- 星标
- 3.9k
- 派生
- 374
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 43
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sourcebot-dev/sourcebot 的其他 Issue
-
[bug] Search result hydration performs duplicate repository lookups within the same chunk可能重新可做 @Abhishek-Sonje 于 19 天前认领,目前没有进行中的 PR。 未关闭bug triage needed
难度 2/5 1-3 小时 新手友好度 84/100
sourcebot-dev/sourcebot#1681 · 1 条评论 ·
维护者通常 1 天内回复
-
Linux ctags build instructions in CONTRIBUTING.md are missing build dependencies可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
sourcebot-dev/sourcebot#1633 ·
维护者通常 1 天内回复
-
MCP ask_codebase rejects explicit languageModel: getLanguageModelKey includes displayName which the MCP schema doesn't expose可能重新可做 @Harsh23Kashyap 于 101 天前认领,目前没有进行中的 PR。 未关闭ask_sb bug
难度 2/5 1-3 小时 新手友好度 76/100
sourcebot-dev/sourcebot#1137 · 4 条评论 ·
维护者通常 1 天内回复
-
[FR] Support file-based and Azure Key Vault token sources alongside env and googleCloudSecret可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 4/5 3-5 天 新手友好度 64/100
sourcebot-dev/sourcebot#1704 · 1 条评论 ·
维护者通常 1 天内回复
-
[bug] Local repositories with a space or non-ASCII character in the path cannot be indexed可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
sourcebot-dev/sourcebot#1689 ·
维护者通常 1 天内回复
查看 sourcebot-dev/sourcebot 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
homarr-labs/dashboard-icons#2939 ·
维护者通常 1 天内回复
-
Agent/category reasoning variants are still checked against the stale model cache in chat.params未关闭opencode
难度 2/5 1-3 小时 新手友好度 75/100
code-yeongyu/oh-my-openagent#10003 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
维护者通常 1 天内回复