Revert "Use replacement string for replace filters literally (#924)"

This reverts commit 27c91203ab.
This commit is contained in:
Justin Li
2017-12-04 15:07:59 -05:00
parent 2ad7a37d44
commit e6ba6ee87b
2 changed files with 2 additions and 6 deletions
+2 -4
View File
@@ -201,14 +201,12 @@ module Liquid
# Replace occurrences of a string with another
def replace(input, string, replacement = ''.freeze)
replacement = replacement.to_s
input.to_s.gsub(string.to_s) { replacement }
input.to_s.gsub(string.to_s, replacement.to_s)
end
# Replace the first occurrences of a string with another
def replace_first(input, string, replacement = ''.freeze)
replacement = replacement.to_s
input.to_s.sub(string.to_s) { replacement }
input.to_s.sub(string.to_s, replacement.to_s)
end
# remove a substring