Skip to content

Commit

Permalink
cleanup css regex
Browse files Browse the repository at this point in the history
  • Loading branch information
aruntk committed Mar 14, 2017
1 parent 2f4e579 commit ca61785
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class DissectHtml {
const self = this
// to get -> property: url(filepath)

const processed = text.replace(/url\(["'|]?([^"'|)]+?)["'|]?\)/ig, function (_u, url) {
const processed = text.replace(/url\(["']?([^"')]+?)["']?\)/ig, function (_u, url) {
// to get -> filepath from url(filepath), url('filepath') and url('filepath')
return `url(${self._changeRelUrl(url, path.dirname(cssBasePath))})`
})
Expand Down

0 comments on commit ca61785

Please sign in to comment.