Fix syntax bug on retina file matching

v3-stable
Paulo 2015-05-09 11:15:16 +02:00
parent 647ec149ca
commit f2f8a42f00
1 changed files with 1 additions and 1 deletions

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