removed String monkey patch
This commit is contained in:
parent
60a4a01aef
commit
f6fc30c489
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue