soupsieve
soupsieve copied to clipboard
Case sensitive :contains()?
This issue will explore the possibility of a case insensitive :contains()
. Since we are thinking about expanding :contains()
to allow lists, it may make sense to try and do something like what attribute selectors do: :contains(text i)
. Or maybe we need to create our own custom pseudo class that implements a case insensitive version, such as :icontains()
.
Nothing currently is settled, and whether this gets implemented or not and what the name of the pseudo-class would be is still up in the air.
I guess you could get away with something like :contains(text i, "more text" i)
. It is easy enough to parse, just not sure how I feel about it though.
While this may still be worth doing, if we decide to move forward with #175, you could work around this with case insensitive regex. Going either way with these is non-standard. We can do one or both.