timdown / rangy

A cross-browser JavaScript range and selection library.
MIT License
2.24k stars 368 forks source link

rangy.findText() not working for text with &nbsp space. #404

Open rajanikanth05 opened 8 years ago

rajanikanth05 commented 8 years ago

I'm using rangy-TextRange module's rangy.findText() to find and highlight text. I figured out that the findText() returns false for the text that has &nbsp space init.

rajanikanth05 commented 8 years ago

Added fix https://github.com/timdown/rangy/pull/405

lddubeau commented 6 years ago

It seems to me you just need to use the character options. Specifically, the ignoreCharacters option.