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:
Teknium
2026-04-02 00:16:09 -07:00
committed by Teknium
parent 9825cd7b1e
commit e4db72ef39
2 changed files with 14 additions and 13 deletions

View File

@@ -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