Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ var func = require('rework-plugin-function');
module.exports = function(fn) {
return func({
url: function(path){
if (path.indexOf('data:image') == 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return value here will always be a number so === should be used (as it is generally preferred over == equal)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@techwes resolved that

return 'url("' + path + '")';
}
path = path.split('"').join('');
path = path.split('\'').join('');
return 'url("' + fn.call(this, path.trim()) + '")';
Expand Down