diff --git a/bikeshed/boilerplate.py b/bikeshed/boilerplate.py index 7bd11af930..5dfd2efdb0 100644 --- a/bikeshed/boilerplate.py +++ b/bikeshed/boilerplate.py @@ -5,7 +5,7 @@ from collections import OrderedDict, defaultdict from datetime import datetime -from . import conditional, config, dfnpanels, h, messages as m +from . import biblio, conditional, config, dfnpanels, h, messages as m from .DefaultOrderedDict import DefaultOrderedDict from .refs import utils as refUtils @@ -532,7 +532,10 @@ def makeLink(*contents): for spec, refGroups in sorted(doc.externalRefsUsed.items(), key=lambda x: x[0].upper()): # ref.spec is always lowercase; if the same string shows up in biblio data, # use its casing instead. - biblioRef = doc.refs.getBiblioRef(spec, quiet=True) + if "_biblio" in refGroups: + biblioRef = refGroups["_biblio"] + else: + biblioRef = doc.refs.getBiblioRef(spec, quiet=True) if biblioRef: printableSpec = biblioRef.linkText else: @@ -548,7 +551,10 @@ def makeLink(*contents): h.E.li(h.E.a(attrs, "[", printableSpec, "]"), " defines the following terms:"), ) termsUl = h.appendChild(specLi, h.E.ul()) - for _, refs in sorted(refGroups.items(), key=lambda x: x[0]): + for tempkey, refs in sorted(refGroups.items(), key=lambda x: x[0]): + if isinstance(refs, biblio.BiblioEntry): + # Not a refGroup, just some metadata + continue if len(refs) == 1: ref = list(refs.values())[0] link = makeLink(ref.text) diff --git a/bikeshed/unsortedJunk.py b/bikeshed/unsortedJunk.py index ac606e6c93..ee9f2c10ae 100644 --- a/bikeshed/unsortedJunk.py +++ b/bikeshed/unsortedJunk.py @@ -957,19 +957,27 @@ def processAutolinks(doc): if ref and ref.spec and doc.refs.spec and ref.spec.lower() != doc.refs.spec.lower(): spec = ref.spec.lower() key = ref.for_[0] if ref.for_ else "" + if isNormative(el, doc): biblioStorage = doc.normativeRefs else: biblioStorage = doc.informativeRefs + + # If the ref is from an anchor block, it knows what it's doing. + # Don't follow obsoletion chains. + allowObsolete = ref.status == "anchor-block" + biblioRef = doc.refs.getBiblioRef( ref.spec, status=doc.md.defaultRefStatus, generateFakeRef=True, - quiet=True, + quiet=False, + allowObsolete=allowObsolete, ) if biblioRef: biblioStorage[biblioRef.linkText] = biblioRef spec = biblioRef.linkText.lower() + doc.externalRefsUsed[spec]["_biblio"] = biblioRef doc.externalRefsUsed[spec][ref.text][key] = ref if ref: diff --git a/tests/github/w3c/ServiceWorker/publish/service_worker/WD-service-workers-20160830/index.html b/tests/github/w3c/ServiceWorker/publish/service_worker/WD-service-workers-20160830/index.html index 80a32ae030..47e07f9bdf 100644 --- a/tests/github/w3c/ServiceWorker/publish/service_worker/WD-service-workers-20160830/index.html +++ b/tests/github/w3c/ServiceWorker/publish/service_worker/WD-service-workers-20160830/index.html @@ -6663,7 +6663,7 @@

onevicted
  • - [RFC5988] defines the following terms: + [rfc5988] defines the following terms: