Skip to content

Commit

Permalink
Revert "handle regex special characters"
Browse files Browse the repository at this point in the history
This reverts commit 8dd8345.

We shouldn't have changed the original behavior, which
too many people are relying on at this point.

It's also technically a breaking change, which we shouldn't
have landed on a minor/patch version change. So in the interest
of not breaking people's logs in production, reverting this.

We can discuss in a new issue if we want to restore this patch
for a `v3` release, but at the moment I'm personally leaningo
towards *no*, for historical reasons (i.e. this is reminding
me of Node.js trying to remove `sys` if anybody reading this
remembers those days).

See the discussion in #250 for more backlog.
  • Loading branch information
TooTallNate committed Nov 22, 2016
1 parent 3ad8df7 commit e2a1955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debug.js
Expand Up @@ -144,7 +144,7 @@ function enable(namespaces) {

for (var i = 0; i < len; i++) {
if (!split[i]) continue; // ignore empty strings
namespaces = split[i].replace(/[\\^$+?.()|[\]{}]/g, '\\$&').replace(/\*/g, '.*?');
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
Expand Down

0 comments on commit e2a1955

Please sign in to comment.