mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
fix: merge dotted+hyphenated FTS5 quoting into single pass
The original PR applied dotted and hyphenated regex quoting in two sequential steps. For terms with both dots and hyphens (e.g. my-app.config.ts), step 2 would re-match inside already-quoted output, producing malformed double-quoted FTS5 syntax. Merged into a single regex pass: \w+(?:[.-]\w+)+ — handles dots, hyphens, and mixed terms in one shot. Added test coverage for the mixed case.
This commit is contained in:
@@ -474,6 +474,10 @@ class TestFTS5Search:
|
||||
assert '"P2.2"' in result
|
||||
assert '"simulate.p2"' in result
|
||||
|
||||
# Mixed dots and hyphens — single pass avoids double-quoting
|
||||
assert s('my-app.config') == '"my-app.config"'
|
||||
assert s('my-app.config.ts') == '"my-app.config.ts"'
|
||||
|
||||
|
||||
# =========================================================================
|
||||
# Session search and listing
|
||||
|
||||
Reference in New Issue
Block a user