-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up normalize_whitespace / to_regexp implementation
- Loading branch information
Showing
1 changed file
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33cc2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should fix #767, right? Should we maybe add a test case for the failing behaviour?
33cc2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it doesn't, it's just preliminary cleanup. We need to use
[\s\u00a0]
in several places because Ruby is stupid. I have a test and half a fix in my repo, but I need to move normalize_whitespace to a place where it's accessible by other methods, notably RackTest::Node#text. Any ideas? Should I create a Capybara::Helpers module?33cc2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be the best option. Though really, why doesn't Ruby do this out of the box? Sigh.