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

search in subelement #55

Open
czhang03 opened this issue Nov 30, 2017 · 1 comment
Open

search in subelement #55

czhang03 opened this issue Nov 30, 2017 · 1 comment

Comments

@czhang03
Copy link

Is it possible to search in subelement? I currently have code like this

<li class="search-item">
  <a><img class="image"/></a>
  <div class="image-description">this is the description</div>
</li>

I want to search in the .image-description with hightlight.

I can think of the following way:

<li class="search-item">
  <a><img class="image"/></a>
  this is the description
</li>

But this way makes formatting really hard.

Is there a way to do it?

@maxwroc
Copy link

maxwroc commented Aug 25, 2019

You can add attribute to LI e.g. description="this is the description" then use the attribute option when you init plugin

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

2 participants