Skip to content

Commit

Permalink
Add space for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
proginosko committed Feb 13, 2018
1 parent e685ab5 commit 8398c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function getRegExpSites(sites, matchSubdomains) {
//
function patternToRegExp(pattern, matchSubdomains) {
let special = /[\.\|\?\:\+\-\^\$\(\)\[\]\{\}\\]/g;
let subdomains = matchSubdomains? "([^/]*\\.)?" : "(www\\.)?"
let subdomains = matchSubdomains ? "([^/]*\\.)?" : "(www\\.)?"
return subdomains + pattern
.replace(special, "\\$&") // fix special chars
.replace(/^www\\\./, "") // remove existing www prefix
Expand Down

0 comments on commit 8398c8e

Please sign in to comment.