Skip to content

Commit e2a1955

Browse files
committed
Revert "handle regex special characters"
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.
1 parent 3ad8df7 commit e2a1955

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function enable(namespaces) {
144144

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

0 commit comments

Comments
 (0)