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

Highlight the words / regex result found in a query #6

Open
talolard opened this issue Jul 5, 2019 · 0 comments
Open

Highlight the words / regex result found in a query #6

talolard opened this issue Jul 5, 2019 · 0 comments

Comments

@talolard
Copy link
Collaborator

talolard commented Jul 5, 2019

A user searches and gets back results but now we don't show them where the search matched in each example. We want to to do that because it's super helpful.

This needs to happen in the example, not at search time because we "lazy load" the example. In turn that makes sense, because it would be dumb to load 1000 results when we only display 4.

It would be good to keep this fast, so that it doesn't take a long time to load an example, e.g. in the case where the example has long text and we are matching a complicated regex. Probably worth trying the first time with just matching the string on load, and if that doesn't work out then render it once without highlighting and then again once the highlight is calculated.

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