From 3da0682a51adcec256cc8899bac9d043bf2ab10a Mon Sep 17 00:00:00 2001 From: Eugene Kuzmenko Date: Wed, 25 Jan 2017 18:18:25 +0100 Subject: [PATCH] [fixed] escape the Windows directory separator in the `logger` module --- docs/logger.js.html | 2 +- lib/logger.js | 2 +- src/logger.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/logger.js.html b/docs/logger.js.html index de10034..dc9691c 100644 --- a/docs/logger.js.html +++ b/docs/logger.js.html @@ -48,7 +48,7 @@

logger.js

/* eslint-disable no-console */ const pattern = /at (?:(.*) )?\(?([^(]*):(\d+):(\d+)\)?$/, - separatorPattern = new RegExp(sep); + separatorPattern = new RegExp(sep.replace('\\', '\\\\')); /** * Dead-simple, composable, isomorphic, cross-browser wrapper for `console.log`. diff --git a/lib/logger.js b/lib/logger.js index dc7bf28..ba02cb7 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -29,7 +29,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /* eslint-disable no-console */ const pattern = /at (?:(.*) )?\(?([^(]*):(\d+):(\d+)\)?$/, - separatorPattern = new RegExp(_path.sep); + separatorPattern = new RegExp(_path.sep.replace('\\', '\\\\')); /** * Dead-simple, composable, isomorphic, cross-browser wrapper for `console.log`. diff --git a/src/logger.js b/src/logger.js index b5c4d47..2ab63fe 100644 --- a/src/logger.js +++ b/src/logger.js @@ -9,7 +9,7 @@ import transform from 'lodash/transform'; /* eslint-disable no-console */ const pattern = /at (?:(.*) )?\(?([^(]*):(\d+):(\d+)\)?$/, - separatorPattern = new RegExp(sep); + separatorPattern = new RegExp(sep.replace('\\', '\\\\')); /** * Dead-simple, composable, isomorphic, cross-browser wrapper for `console.log`.