Conversation
Opt-in (default false). When on, the default lookupFilter and formatResult fold case and strip combining marks per character, so "cafe" matches and highlights "Café". A per-character fold map lets highlights wrap the original accented text, including decomposed marks. Both callbacks now also receive the resolved options (additive, optional parameter) so the defaults can read the flag. The README documents the option and a wrapper for highlighting with <mark> instead of <strong>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Closing in favour of README recipes (see #893): accent-insensitive filtering is a one-line custom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #893.
What
New opt-in option
ignoreDiacritics(defaultfalse). Whentrue, the defaultlookupFilterandformatResultignore accents, so typingcafefindsCaféin a local lookup and the highlight wraps the originalCafé.ßis not treated asss.API
formatResultandlookupFilternow receive the resolvedoptionsas an extra, optional last argument, so the defaults can read the flag. Existing custom callbacks and direct calls to the defaults are unaffected. The non-folding highlight path produces the same output as before.Docs
README: new option row, updated callback signatures, and a Styling example for highlighting with
<mark>instead of<strong>by wrapping the default formatter (the other half of #893).Tests
9 new specs: off by default, filtering, highlighting, decomposed marks, repeated matches,
ß, HTML escaping, a query that folds to nothing, and an end-to-end lookup.🤖 Generated with Claude Code