Match all node types when using node()

Previously this would only match element and text nodes.
This commit is contained in:
Yorick Peterse committed 2014-08-22 10:58:36 +02:00
1 parent da09f1296c
commit 6ac3408a71
2 files changed
+11 -5

No files matched your search

+1 -3
View File
@@ -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