question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show Name of Matching Person Then Highlighted Result

See original GitHub issue

Hey all,

So what I’m trying to do is have a search on my site that searches through users. It’s supposed to search through a lot of attributes (about 10-12) and it’s supposed to return matched users links to their profile using the hit item’s {{username}} such as <a href="mywebsite.com/{{username}}>{{name}}</a>

What I’d like is that first part <a href="mywebsite.com/{{username}}>{{name}}</a>: and then it would return the matched result

So part of my query might be searching for a movie credit for instance, where we would have something like this value in the backend The Incredible Hulk, Co-Star, Steven Spielberg, Film

So If I queried for “Hulk”, I would want it to show, <a href="mywebsite.com/{{username}}>{{name}}</a>: The Incredible _Hulk_, Co-Star, Steven Spielberg, Film.

Edit: Hulk in the above was supposed to be italicized

I just don’t know quite how to access the matched term

Thanks, I appreciate all you’ve done, this was the easiest setup for search that I’ve ever used

  • Zach

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ZachHandleycommented, Jan 30, 2018

Here’s my current setup: https://jsfiddle.net/frpb3ez4/1/

0reactions
ZachHandleycommented, Feb 3, 2018

Where do I put that? Can I use if’s after item: ? I didn’t think I could because it accepts an array

Read more comments on GitHub >

github_iconTop Results From Across the Web

Search and Highlight Data in Excel (with Conditional Formatting)
Search and Highlight Data in Excel with Conditional Formatting - highlight matching cells, rows, and even make it dynamic (highlight as you type)....
Read more >
Display all output but highlight search matches - Super User
To use a Color GREP to only highlight matched patterns but not otherwise change the output: grep --color=always -e "^" -e "hello" testfile....
Read more >
How to use Excel's find feature to highlight or delete matching ...
Click Find All to display the list shown in Figure C. Notice that the feature selects the first matching item in the list....
Read more >
Compare Two Lists & Extract Matching / Common Names in ...
Compare Two Lists & Extract Matching / Common Names in Separate Column, Unique Match Names in Excel#DynamicArray #UniqueList #CommonNames ...
Read more >
Colorized grep -- viewing the entire file with highlighted matches
I'd really like to cat a file and see the entire file with the pattern matches highlighted.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found