10000 Fix unit tests for debug · nullstring/less.js@464e777 · GitHub
[go: up one dir, main page]

Skip to content

Commit 464e777

Browse files
committed
Fix unit tests for debug
1 parent f9b68f8 commit 464e777

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/less-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ runTestSet({strictUnits: false, strictMaths: false}, "legacy/");
6666
function globalReplacements(input, directory) {
6767
var p = path.join(process.cwd(), directory),
6868
pathimport = path.join(process.cwd(), directory + "import/"),
69-
pathesc = p.replace(/[.:\/]/g, '\\$&'),
70-
pathimportesc = pathimport.replace(/[.:\/]/g, '\\$&');
69+
pathesc = p.replace(/[.:/\\]/g, function(a) { return '\\' + (a=='\\' ? '\/' : a); }),
70+
pathimportesc = pathimport.replace(/[.:/\\]/g, function(a) { return '\\' + (a=='\\' ? '\/' : a); });
7171

7272
return input.replace(/\{path\}/g, p)
7373
.replace(/\{pathesc\}/g, pathesc)

0 commit comments

Comments
 (0)
0