leemunroe / grunt-email-workflow

A Grunt workflow for designing and testing responsive HTML email templates with SCSS.
MIT License
3.05k stars 339 forks source link

Error: Unable to match 1 pattern. #109

Closed michaelpanik closed 4 years ago

michaelpanik commented 4 years ago

I've cloned the repo, run grunt. Everything is fine except for the last task I get this error:

Running "replace:src_images" (replace) task
>> Unable to match 1 pattern.
>> 1 replacement in 3 files.

Then when I load branded.html in the browser, the image src is broken.

taeo commented 4 years ago

Thanks @michaelpanik. I can reproduce the issue. We'll look into it and follow up once it's resolved.

leemunroe commented 4 years ago

grunt-replace isn't maintained anymore so maybe need a replacement for that https://github.com/outatime/grunt-replace

Possibly https://github.com/gbochenek/grunt-replace-regex — haven't had time to verify yet

taeo commented 4 years ago

@michaelpanik - Finally got around to this. Unable to match X pattern is not an error. It just indicates that X patterns were not matched.

I'm assuming you're not using any background images, so this pattern from grunt/replace.js isn't being matched.

        {
          match: /(url\(*[^)])(\.\.\/src\/img\/)/gi,  // Matches url('../src/img') or url(../src/img) and even url("../src/img")
          replacement: '$1../<%= paths.dist_img %>/'
        }