[bug] Escaped quotes in a quoted keyword search are searched with the backslashes
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #1688 của @breken-ai — đã đóng, không merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- search
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.)
- Ngôn ngữ chính
- TypeScript
- Star
- 3.9k
- Fork
- 374
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sourcebot-dev/sourcebot
-
[bug] Search result hydration performs duplicate repository lookups within the same chunkCó thể làm lại được @Abhishek-Sonje đã nhận 19 ngày trước và không có pull request nào đang mở. Đang mởbug triage needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
sourcebot-dev/sourcebot#1681 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Linux ctags build instructions in CONTRIBUTING.md are missing build dependenciesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
sourcebot-dev/sourcebot#1633 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
MCP ask_codebase rejects explicit languageModel: getLanguageModelKey includes displayName which the MCP schema doesn't exposeCó thể làm lại được @Harsh23Kashyap đã nhận 101 ngày trước và không có pull request nào đang mở. Đang mởask_sb bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
sourcebot-dev/sourcebot#1137 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[FR] Support file-based and Azure Key Vault token sources alongside env and googleCloudSecretCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
sourcebot-dev/sourcebot#1704 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] Local repositories with a space or non-ASCII character in the path cannot be indexedCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
sourcebot-dev/sourcebot#1689 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sourcebot-dev/sourcebot
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(icons): add [solidping]Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
homarr-labs/dashboard-icons#2939 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Agent/category reasoning variants are still checked against the stale model cache in chat.paramsĐang mởopencode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
code-yeongyu/oh-my-openagent#10003 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Actions on ToastsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
Maintainer thường phản hồi trong vòng 1 ngày