mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Use start and end of string rather than line matching in regexes.
This commit is contained in:
@@ -54,7 +54,7 @@ module ShopFilter
|
||||
|
||||
def product_img_url(url, style = 'small')
|
||||
|
||||
unless url =~ /^products\/([\w\-\_]+)\.(\w{2,4})/
|
||||
unless url =~ /\Aproducts\/([\w\-\_]+)\.(\w{2,4})/
|
||||
raise ArgumentError, 'filter "size" can only be called on product images'
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user