soupsieve icon indicating copy to clipboard operation
soupsieve copied to clipboard

Case sensitive :contains()?

Open facelessuser opened this issue 6 years ago • 2 comments

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.

facelessuser avatar Feb 22 '19 04:02 facelessuser

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.

facelessuser avatar Feb 22 '19 15:02 facelessuser

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.

facelessuser avatar Jan 26 '20 22:01 facelessuser