lib/stringex/localization/conversion_expressions.rb in stringex-2.0.2 vs lib/stringex/localization/conversion_expressions.rb in stringex-2.0.3

- old
+ new

@@ -23,22 +23,24 @@ :slash => /\s*(\\|\/|/)\s*/, :star => /\s*\*\s*/, } # Things that just get converted to spaces - CLEANUP_CHARACTERS = /[\.,:;(){}\[\]\/\?!\^'ʼ"_\|]/ + CLEANUP_CHARACTERS = /[\.,:;(){}\[\]\?!\^'ʼ"_\|]/ CLEANUP_HTML_ENTITIES = /&[^;]+;/ CURRENCIES_SUPPORTED_SIMPLE = { :dollars => /\$/, :euros => /€/, :pounds => /£/, :yen => /¥/, + :reais => /R$/ } CURRENCIES_SUPPORTED_COMPLEX = { :dollars => :dollars_cents, :euros => :euros_cents, :pounds => :pounds_pence, + :reais => :reais_cents } CURRENCIES_SUPPORTED = Regexp.new(CURRENCIES_SUPPORTED_SIMPLE.values.join('|')) CURRENCIES_SIMPLE = CURRENCIES_SUPPORTED_SIMPLE.inject({}) do |hash, content| key, expression = content hash[key] = /(?:\s|^)#{expression}(\d*)(?:\s|$)/