Match all node types when using node()
Previously this would only match element and text nodes.
This commit is contained in:
1 parent
da09f1296c
commit
6ac3408a71
2 files changed
+11
-5
No files matched your search
@@ -515,9 +515,7 @@ module Oga
|
||||
nodes = XML::NodeSet.new
|
||||
|
||||
context.each do |node|
|
||||
if node.is_a?(XML::Element) or node.is_a?(XML::Text)
|
||||
nodes << node
|
||||
end
|
||||
nodes << node if node.is_a?(XML::Node)
|
||||
end
|
||||
|
||||
return nodes
|
||||
|
||||
Reference in new issue
Block a user