[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 於 20 天前認領,目前沒有進行中的 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 於 102 天前認領,目前沒有進行中的 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
-
Bayern feature:Application ready web
難度 2/5 1-3 小時 新手友好度 67/100
digitalfabrik/entitlementcard#3176 ·
維護者通常 7 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
NanmiCoder/cc-haha#1533 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
🐛 Bug: Calendar work items cannot be opened on mobile可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 1/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 92/100