<div>Some reallllly
realllyyy long text</div>
will render as Some reallllly realllyyy long text because HTML removes the line breaks.
But I can't find the div using the :contains() CSS selector because of the line break:
// Returns an empty array
$(':contains("Some reallllly realllyyy long text")');
Is there a way to select the div and ignore the line-break?
Note: I don't want to add the line break in the selector, I want to be able to select the div without knowing there is a line break (because I use the text that the user can see, and he can't see the line break)