diff --git a/lib/microformats2.rb b/lib/microformats2.rb index e5e204b..f212271 100644 --- a/lib/microformats2.rb +++ b/lib/microformats2.rb @@ -41,7 +41,7 @@ module Microformats2 if css_class =~ /^[pnei]/ css_class = css_class[2..-1].gsub("-","_") method_name = css_class.gsub("-","_") - value = property.text.strip_whitespace + value = property.text.gsub(/\n+/, " ").gsub(/\s+/, " ").strip obj.class.class_eval { attr_accessor method_name } @@ -155,9 +155,3 @@ module Microformats2 end end end - -class String - def strip_whitespace - self.gsub(/\n+/, " ").gsub(/\s+/, " ").strip - end -end