diff --git a/src/browserlib/extract-dfns.mjs b/src/browserlib/extract-dfns.mjs index 3c1efe1d..f5951969 100644 --- a/src/browserlib/extract-dfns.mjs +++ b/src/browserlib/extract-dfns.mjs @@ -341,7 +341,9 @@ export default function (spec, idToHeading = {}) { // (pending a proper dfns curation process, see: // https://github.com/w3c/webref/issues/789) .filter(node => { - const link = node.querySelector('a[href^="http"]'); + const link = + node.querySelector('a[href^="http"]') ?? + node.closest('a[href^="http"]'); return !link || (node.textContent.trim() !== link.textContent.trim()) || (link.href === 'https://www.w3.org/TR/CSS2/syndata.html#vendor-keywords'); diff --git a/tests/extract-dfns.js b/tests/extract-dfns.js index 72fd06f8..0acc1616 100644 --- a/tests/extract-dfns.js +++ b/tests/extract-dfns.js @@ -325,6 +325,12 @@ const tests = [ changesToBaseDfn: [], spec: "html" }, + { + title: "ignores definitions imported in the Source map format spec", + html: '
  • The byte sequence', + changesToBaseDfn: [], + spec: "sourcemap" + }, { "title": "extracts attribute definition from the SVG2 spec", html: `