@ctweney something i'm struggling with in nokogiri, .search always returns a nodeset (whether or not it's a leaf). Calling .text on non-leaf nodes has some nasty ramifications (i think it flattens the structure and appends all the text together). We'll have to figure out if there's a nice way to check if a match is always a leaf node. I'm not sure if this applies for .css as well but it's worth double checking.