Skip to content

Commit

Permalink
fix: line breaks in url function
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Sep 8, 2020
1 parent 8b865fe commit 88b8ddc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Expand Up @@ -78,8 +78,8 @@ function defaultGetLocalIdent(
function normalizeUrl(url, isStringValue) {
let normalizedUrl = url;

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

if (matchNativeWin32Path.test(url)) {
Expand Down

0 comments on commit 88b8ddc

Please sign in to comment.