lib/orange/resources/parser.rb in orange-0.0.4 vs lib/orange/resources/parser.rb in orange-0.0.5
- old
+ new
@@ -50,12 +50,14 @@
end
module Pulp::ParserPulp
def html(&block)
if block_given?
- doc = orange[:parser].hpricot(packet[:content])
- yield doc
- packet[:content] = doc.to_s
+ unless(packet[:content].blank?)
+ doc = orange[:parser].hpricot(packet[:content])
+ yield doc
+ packet[:content] = doc.to_s
+ end
end
end
end
end
\ No newline at end of file