lib/evertils/helpers/api-enml-handler.rb in evertils-0.3.25 vs lib/evertils/helpers/api-enml-handler.rb in evertils-0.3.26

- old
+ new

@@ -3,12 +3,12 @@ class ApiEnmlHandler include Nokogiri::XML # # @since 0.3.7 - def initialize(config = nil) - @config = config + def initialize(args = []) + @config = args.first self end # # @since 0.3.13 @@ -45,10 +45,10 @@ def clear_empty @xml.css('div').each do |node| children = node.children if children.size == 1 && children.first.is_a?(Nokogiri::XML::Text) - node.remove if node.text.strip == '' + node.remove if node.text.strip.empty? end end @xml end