Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hightlight matching parts in names #17

Open
art-w opened this issue Feb 2, 2024 · 0 comments
Open

Hightlight matching parts in names #17

art-w opened this issue Feb 2, 2024 · 0 comments

Comments

@art-w
Copy link
Owner

art-w commented Feb 2, 2024

We compute the string index of each query word which matches the result's name in query/name_cost.ml, but then only keep the total of the costs. If we also preserved the indexes, we could explain the results by highlighting the matching parts of the names with <mark>.

Doing the same for the documentation comments will require do a similar search but on html (which isn't done yet, as we just assume a query word not found in the name will be in the comment!). It'll be even harder to have a similar highlight for types, since their pretty-pretting is handled by odoc so we don't know which substrings to highlight... We can probably do follow-up PRs for those, name matching would already be a great first step.

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

No branches or pull requests

1 participant