Skip to content

Commit 88b8ddc

Browse files
fix: line breaks in url function
1 parent 8b865fe commit 88b8ddc

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

src/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ function defaultGetLocalIdent(
7878
function normalizeUrl(url, isStringValue) {
7979
let normalizedUrl = url;
8080

81-
if (isStringValue && /\\[\n]/.test(normalizedUrl)) {
82-
normalizedUrl = normalizedUrl.replace(/\\[\n]/g, '');
81+
if (isStringValue && /\\(\n|\r\n|\r|\f)/.test(normalizedUrl)) {
82+
normalizedUrl = normalizedUrl.replace(/\\(\n|\r\n|\r|\f)/g, '');
8383
}
8484

8585
if (matchNativeWin32Path.test(url)) {

0 commit comments

Comments
 (0)