lib/lucky_sneaks/string_extensions.rb in stringex-1.2.2 vs lib/lucky_sneaks/string_extensions.rb in stringex-1.3.0
- old
+ new
@@ -152,10 +152,11 @@
/(\s|^)£(\d*)(\s|$)/u => '\2 pounds',
/(\s|^)¥(\d*)(\s|$)/u => '\2 yen',
/\s*\*\s*/ => "star",
/\s*%\s*/ => "percent",
/\s*(\\|\/)\s*/ => "slash",
- /(\s*=\s*)/ => " equals "
+ /(\s*=\s*)/ => " equals ",
+ /\s*\+\s*/ => "plus"
}.each do |found, replaced|
replaced = " #{replaced} " unless replaced =~ /\\1/
dummy.gsub!(found, replaced)
end
dummy = dummy.gsub(/(^|\w)'(\w|$)/, '\1\2').gsub(/[\.,:;()\[\]\/\?!\^'"_]/, " ")