lib/epub/parser/xml_document/refinements/rexml.rb in epub-parser-0.4.1 vs lib/epub/parser/xml_document/refinements/rexml.rb in epub-parser-0.4.2
- old
+ new
@@ -25,10 +25,17 @@
end
alias namespace_uri namespace
def content
- texts.join
+ each_child.inject("") {|text, node|
+ case node.node_type
+ when :document, :element
+ text << node.content
+ when :text
+ text << node.value
+ end
+ }
end
end
refine ::REXML::Text do
alias content value