mirror of
https://github.com/debug-js/debug.git
synced 2026-01-18 16:12:38 +00:00
Revert "handle regex special characters"
This reverts commit 8dd8345d1498b8c6a3c6d7f7f4ebc600cfd2195b. 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.
This commit is contained in:
parent
3ad8df7561
commit
e2a1955330
2
debug.js
2
debug.js
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user