Merge branch 'master' into master

This commit is contained in:
James 2016-03-22 17:35:21 +00:00
commit cc25c784f9
4 changed files with 11 additions and 1 deletions

View file

@ -283,8 +283,15 @@ Feature: Assets get file hashes appended to them and references to them are upda
When I cd to "build" When I cd to "build"
Then the following files should exist: Then the following files should exist:
| javascripts/jquery.min-276c87ff.js | | javascripts/jquery.min-276c87ff.js |
| stylesheets/test-7de2ad06.css |
And the following files should not exist: And the following files should not exist:
| javascripts/jquery.min.js | | javascripts/jquery.min.js |
And the file "stylesheets/test-7de2ad06.css" should contain:
"""
.no-bug{background-image:url(/images/100px-5fd6fb90.jpg)}
.bug{content:"";background-image:url(/images/100px-5fd6fb90.jpg)}
.no-bug{content:""; background-image:url(/images/100px-5fd6fb90.jpg)}
"""
Scenario: Source map paths include the hash Scenario: Source map paths include the hash
Given a successfully built app at "asset-hash-source-map" Given a successfully built app at "asset-hash-source-map"

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

View file

@ -0,0 +1,3 @@
.no-bug{background-image:url(/images/100px.jpg)}
.bug{content:"";background-image:url(/images/100px.jpg)}
.no-bug{content:""; background-image:url(/images/100px.jpg)}

View file

@ -22,7 +22,7 @@ module Middleman
Contract String, String, ArrayOf[String], Proc => String Contract String, String, ArrayOf[String], Proc => String
def rewrite_paths(body, _path, exts, &_block) def rewrite_paths(body, _path, exts, &_block)
matcher = /([\'\"\(,]\s*|# sourceMappingURL=)([^\s\'\"\)>]+(#{::Regexp.union(exts)}))/ matcher = /([\'\"\(,]\s*|# sourceMappingURL=)([^\s\'\"\)\(>]+(#{::Regexp.union(exts)}))/
url_fn_prefix = 'url(' url_fn_prefix = 'url('