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 authored 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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 88b8ddc

Please sign in to comment.