| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 114e088 commit b4ca4a6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ const test = require('node:test'); | |||
| 5 | 5 | const fs = require('node:fs/promises'); | |
| 6 | 6 | const assert = require('node:assert/strict'); | |
| 7 | 7 | ||
| 8 | - const stackFramesRegexp = /(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g; | ||
| 8 | + const stackFramesRegexp = /(?<=\n)(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g; | ||
| 9 | 9 | const windowNewlineRegexp = /\r/g; | |
| 10 | 10 | ||
| 11 | 11 | function replaceStackTrace(str, replacement = '$1*$7$8\n') { | |
@@ -17,7 +17,7 @@ function replaceWindowsLineEndings(str) { | |||
| 17 | 17 | } | |
| 18 | 18 | ||
| 19 | 19 | function replaceWindowsPaths(str) { | |
| 20 | - return str.replaceAll(path.win32.sep, path.posix.sep); | ||
| 20 | + return common.isWindows ? str.replaceAll(path.win32.sep, path.posix.sep) : str; | ||
| 21 | 21 | } | |
| 22 | 22 | ||
| 23 | 23 | function transform(...args) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments