Skip to content

Commit

Permalink
Merge pull request #58 from next0/master
Browse files Browse the repository at this point in the history
Fix data-uri (issue #38)
  • Loading branch information
sokra committed Nov 23, 2015
2 parents 41c6caf + 6bb1d96 commit fdda45b
Show file tree
Hide file tree
Showing 7 changed files with 320 additions and 307 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ function getWebpackFileManager(less, loaderContext, query, isSync) {
return true;
};

WebpackFileManager.prototype.supportsSync = WebpackFileManager.prototype.supports;
WebpackFileManager.prototype.supportsSync = function(filename, currentDirectory, options, environment) {
return isSync;
};

WebpackFileManager.prototype.loadFile = function(filename, currentDirectory, options, environment, callback) {
// Unfortunately we don't have any influence on less to call `loadFile` or `loadFileSync`
Expand Down
3 changes: 3 additions & 0 deletions test/css/data-uri.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.img {
background: url("data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2240%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2210%22%2F%3E%0A%3C%2Fsvg%3E");
}
Loading

0 comments on commit fdda45b

Please sign in to comment.