Skip to content

Commit

Permalink
fix(core/link-to-dfn): don't xref autofills (again) (#2164)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Mar 18, 2019
1 parent 6371f90 commit 2123f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/link-to-dfn.js
Expand Up @@ -237,11 +237,11 @@ function findExplicitExternalLinks() {
);
return [...links]
.filter(el => {
// ignore empties
if (el.textContent.trim() === "") return false;
/** @type {HTMLElement} */
const closest = el.closest("[data-cite]");
return (
!!el.textContent.trim() && (!closest || closest.dataset.cite !== "")
);
return !closest || closest.dataset.cite !== "";
})
.concat([...document.querySelectorAll("dfn.externalDFN")]);
}
Expand Down

0 comments on commit 2123f12

Please sign in to comment.