javve / list.js

The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.
https://listjs.com
MIT License
11.2k stars 898 forks source link

FuzzySearch plugin fails if the string items start with a line break \n #769

Open llagerlof opened 10 months ago

llagerlof commented 10 months ago

If your HTML is like the code below, when you start to search finds nothing.

<td class="item">
  Test item with a line break before
</td>

But if doesn't have line breaks, the fuzzy search works:

<td class="item">Test item with a line break before</td>
oldmanwerther commented 2 months ago

@llagerlof - yea, just make sure your html is inline:

<td class="item">Test item with a line break before</td>