This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
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.
Fix for #84.
2 changes in creation of search index:
When cleaning the glyph name, instead of replacing the literal string ' a ', use a regex to only replace ' a ' when it's not preceded by 'letter'.
This ensures that 'a' is added to the index as a keyword for a glyph when its name contains "letter a":
e.g.,
latin small letter a with grave
…while still excluding 'a' as a keyword for glyph names that use 'a' as an indefinite article:
e.g.,
x in a rectangle box
The result is then consistent with other letter glyphs.
When replacing ' a ' or ' an ', replace with a single space instead of blank to preserve the boundary between the remaining words.
Thus
x in a rectangle box
will be added to the index asx in rectangle box
instead ofx inrectangle box
, and this glyph can then be found by searching for 'rectangle'.Note this change does not affect handling of glyphs with "linear a" in their name, which while not an indefinite article usage, seems to be the desired behavior.