Skip to content

Commit

Permalink
Additive solution to keep localizeLink logic intact. Modified messagi…
Browse files Browse the repository at this point in the history
…ng on status
  • Loading branch information
JasonHowellSlavin committed Dec 18, 2024
1 parent 8c5abc0 commit 9f63ed0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/blocks/preflight/panels/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ async function checkLinks() {
const badResults = [];

links.forEach((link) => {
if (link.href.includes('http://')) {
if (link.dataset?.httpLink) {
const httpLink = {
url: link.href,
status: 'http in link',
status: 'authored as http',
};
badResults.push(httpLink);
}
Expand Down
1 change: 1 addition & 0 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ export function decorateLinks(el) {
const { hostname, href } = window.location;
const links = [...anchors].reduce((rdx, a) => {
appendHtmlToLink(a);
if (a.href.includes('http:')) a.setAttribute('data-http-link', 'true');
a.href = localizeLink(a.href);
decorateSVG(a);
if (a.href.includes('#_blank')) {
Expand Down

0 comments on commit 9f63ed0

Please sign in to comment.