Skip to content

Commit

Permalink
Update dist.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Jan 21, 2025
1 parent fa80bdf commit 24c8a91
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
7 changes: 3 additions & 4 deletions dist/utils.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,7 @@ function isHttps(url) {
}

function isLocalhost(url) {
const re =
/^(https?\:\/\/)(localhost(.[a-z0-9\-])*|127\.0\.0\.1)(\:[\d]+)?(\/(.)*)?$/;
const re = /^(https?:\/\/)(localhost(\.[a-z0-9-]+)*|127\.0\.0\.1)(:\d+)?(\/.*)?$/i;
return re.test(url || getURL());
}

Expand Down Expand Up @@ -3703,8 +3702,8 @@ var TestUtil = {
// };

function removeNamespaces(str) {
return str.replace(/(\<(.|\n)+?\>)/g, (tag) => {
return tag.replace(/(\s|\<\/?){1}([\w]+\:){1}/g, '$1');
return str.replace(/<[^>]*>/g, (tag) => {
return tag.replace(/(\s|<\/?)[a-zA-Z0-9]+\:/g, '$1');
});
}

Expand Down
2 changes: 1 addition & 1 deletion dist/utils.esm.min.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@
}

function isLocalhost(url) {
const re =
/^(https?\:\/\/)(localhost(.[a-z0-9\-])*|127\.0\.0\.1)(\:[\d]+)?(\/(.)*)?$/;
const re = /^(https?:\/\/)(localhost(\.[a-z0-9-]+)*|127\.0\.0\.1)(:\d+)?(\/.*)?$/i;
return re.test(url || getURL());
}

Expand Down Expand Up @@ -3709,8 +3708,8 @@
// };

function removeNamespaces(str) {
return str.replace(/(\<(.|\n)+?\>)/g, (tag) => {
return tag.replace(/(\s|\<\/?){1}([\w]+\:){1}/g, '$1');
return str.replace(/<[^>]*>/g, (tag) => {
return tag.replace(/(\s|<\/?)[a-zA-Z0-9]+\:/g, '$1');
});
}

Expand Down
2 changes: 1 addition & 1 deletion dist/utils.min.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/utils.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@
}

function isLocalhost(url) {
const re =
/^(https?\:\/\/)(localhost(.[a-z0-9\-])*|127\.0\.0\.1)(\:[\d]+)?(\/(.)*)?$/;
const re = /^(https?:\/\/)(localhost(\.[a-z0-9-]+)*|127\.0\.0\.1)(:\d+)?(\/.*)?$/i;
return re.test(url || getURL());
}

Expand Down Expand Up @@ -3709,8 +3708,8 @@
// };

function removeNamespaces(str) {
return str.replace(/(\<(.|\n)+?\>)/g, (tag) => {
return tag.replace(/(\s|\<\/?){1}([\w]+\:){1}/g, '$1');
return str.replace(/<[^>]*>/g, (tag) => {
return tag.replace(/(\s|<\/?)[a-zA-Z0-9]+\:/g, '$1');
});
}

Expand Down
2 changes: 1 addition & 1 deletion dist/utils.umd.min.js

Large diffs are not rendered by default.

0 comments on commit 24c8a91

Please sign in to comment.