You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A combining mark between two copies of a letter stops the camelCase copy taking the match: Score("Addres̃sSpace","sp") = -4 but Score("AddressSpace","sp") = 12 (#114 returns via #139) #142
ContinuesRun (FuzzySearch/Fuzzy.cs:376) decides whether a rematched letter "only follows its own copy" (the #114 fix) by code-unit adjacency:
boolfollowsOwnCopy=rematch&&!nextMatch&&bestLetterIdxis not null&&bestLetterIdx.Value+bestLetterLength==strIdx;
Since #139, SkipUnmatchedMarks steps over combining marks. When a mark sits between the two copies, strIdx lands past bestLetterIdx + bestLetterLength. The doubled letter then counts as continuing a run, and displacesRun stops the later camelCase or separator copy from replacing it. That is the #114 failure again, on the combining-mark path, and it breaks #139's rule that an unmatched mark costs and earns nothing ("q̃Bar costs and earns what qBar does").
Reproduction (HEAD 19f2630; U+0303 doesn't compose with Q or s under NFC, so it survives normalization)
A randomized check that inserted U+0332 after one letter (which should never change the score) found many more cases, all of this shape.
Why it matters
Decomposed text in scripts whose letter-plus-mark has no precomposed form (Yoruba ẹ́, Lithuanian, x̄) scores 10–16 points lower than the same text without the mark. That is enough to reorder results.
Suggested fix
Decide followsOwnCopy from the index of the previous scored codepoint, not from code-unit adjacency. Track a prevScoredIdx at the end of each loop iteration and test bestLetterIdx == prevScoredIdx. Or compare SkipUnmatchedMarks(subject, bestLetterIdx + bestLetterLength, …) with strIdx.
Acceptance criteria
Score("AQ̃qQ","q") == Score("AQqQ","q") and Score("Addres̃sSpace","sp") == Score("AddressSpace","sp").
A property test: inserting a non-composing combining mark after any subject letter leaves the score unchanged.
Priority: Medium. Scores drop by 10–16 points for decomposed text, which can reorder results. It only affects letter-plus-mark sequences with no NFC precomposed form, so the reach is narrow.
Activity
matt-edmondson commentedon Nov 12, 2026
Triage
Fuzzy.ContinuesRunandSkipUnmatchedMarksinteraction (regression of A doubled letter before a camelCase/separator copy blocks that copy's bonus: "sp" scores AddressSpace 1 but the misspelt AddresSpace 12 (regression from 922f860) #114 through Score a combining mark as part of the letter before it [patch] #139)Generated by Claude Code