Fix syntax bug on retina file matching

This commit is contained in:
Paulo 2015-05-09 11:15:16 +02:00
parent 647ec149ca
commit f2f8a42f00

View file

@ -24,7 +24,7 @@ class Middleman::Extensions::AutomaticImageSizes < ::Middleman::Extension
begin
width, height = ::FastImage.size(full_path, raise_on_failure: true)
# Check for @2x and @3x image
retina = full_path.match/(@(\d)x\.[a-zA-Z]{3,4}$/)
retina = full_path.match(/@(\d)x\.[a-zA-Z]{3,4}$/)
if retina
factor = retina[1].to_i
width = width / factor