Skip to content

fix: reinstate reference page filter with search by title and desc - #1532

Merged
ksen0 merged 3 commits into
mainfrom
filter-main
Jul 24, 2026
Merged

fix: reinstate reference page filter with search by title and desc#1532
ksen0 merged 3 commits into
mainfrom
filter-main

Conversation

@ksen0

@ksen0 ksen0 commented Jul 24, 2026

Copy link
Copy Markdown
Member

Fixes: #1401
applies #1465 to main

… tests

The reference filter matched keywords as raw substrings everywhere, so a
search for "sin" flooded results with common words containing it as a
substring ("using", "since", "single") and unrelated names ("asin").

Filtering now runs in two passes:
  1. strict  - exact function/section name matches + whole-word description
               matches
  2. loose   - substring fallback, used only when the strict pass finds
               nothing (so prefix searches like "typog" -> Typography and
               "circ" -> circle still work)

When an exact or whole-word match exists, partial substrings are excluded,
exactly as requested in review. Keyword normalisation also strips trailing
punctuation so "sin." resolves to "sin".

The matching logic is extracted into pure, exported functions
(filterCategoryData, normalizeKeyword) and covered by unit tests for every
scenario raised in the PR discussion.
@ksen0
ksen0 merged commit 4d52fba into main Jul 24, 2026
7 checks passed
@ksen0
ksen0 deleted the filter-main branch July 24, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reinstate Reference filter including description

2 participants