lib/active_cleaner/markdown_cleaner.rb in activecleaner-0.3.0 vs lib/active_cleaner/markdown_cleaner.rb in activecleaner-0.3.1

- old
+ new

@@ -2,11 +2,12 @@ module ActiveCleaner class MarkdownCleaner < BaseCleaner def clean_value(old_value, record=nil) - unless old_value.nil? + case old_value + when String value = old_value.dup value.strip! # clean the new lines mess among OS @@ -23,9 +24,11 @@ # reverse the safe markup value.gsub!(/__NEW_LINE__/, "\n") value.gsub!(/__SPACE__/, " ") value + else + old_value end end end end