You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bad idea. As result you will have a lot of "blank" spans (with any of those characters \f\n\r\t\v\u00A0\u2028\u2029) - it will be bad for html structure.
I had problem with "a new line character", when try to highlight the table.
Better modify condition:
/\S/.test(node.nodeValue) || node.nodeValue.length ==1
Steps to reproduce:
The space is not highlighted and therefore the highlights are not merged. Removing the regex check seems to solve this: https://github.com/mir3z/jquery.texthighlighter/blob/master/src/jquery.textHighlighter.js#L193
Was there another reason for this test? Given the node type has already been verified as text, wouldn't
node.nodeValue
always be a string?The text was updated successfully, but these errors were encountered: