Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Renovate[bot]: Update wordpress monorepo 2023-10-18 (#257)
Browse files Browse the repository at this point in the history
* Renovate[bot]: Update wordpress monorepo

* Commit changes made to `url` package

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mattyrob <[email protected]>
  • Loading branch information
renovate[bot] and mattyrob authored Oct 19, 2023
1 parent ee8865c commit 5aa784e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 38 deletions.
58 changes: 29 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"webpack": "5.89.0"
},
"dependencies": {
"@wordpress/a11y": "3.43.0",
"@wordpress/api-fetch": "6.40.0",
"@wordpress/dom-ready": "3.43.0",
"@wordpress/hooks": "3.43.0",
"@wordpress/i18n": "4.43.0",
"@wordpress/url": "3.44.0",
"@wordpress/a11y": "3.44.0",
"@wordpress/api-fetch": "6.41.0",
"@wordpress/dom-ready": "3.44.0",
"@wordpress/hooks": "3.44.0",
"@wordpress/i18n": "4.44.0",
"@wordpress/url": "3.45.0",
"node-sass": "9.0.0"
},
"collective": {
Expand Down
6 changes: 4 additions & 2 deletions src/wp-includes/js/dist/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,10 @@ function filterURLForDisplay(url, maxLength = null) {
if (filteredURL.match(/^[^\/]+\/$/)) {
filteredURL = filteredURL.replace('/', '');
}
const mediaRegexp = /([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/;
if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(mediaRegexp)) {

// capture file name from URL
const fileRegexp = /\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;
if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(fileRegexp)) {
return filteredURL;
}

Expand Down
Loading

0 comments on commit 5aa784e

Please sign in to comment.