diff --git a/bikeshed/dfnpanels.py b/bikeshed/dfnpanels.py index c9259e8443..1d457ecf17 100644 --- a/bikeshed/dfnpanels.py +++ b/bikeshed/dfnpanels.py @@ -45,7 +45,10 @@ def addDfnPanels(doc, dfns): for i, el in enumerate(els): refID = el.get("id") if refID is None: - refID = f"ref-for-{id}" + if (hasAncestor(el, lambda x: hasClass(x, "domintro"))): + refID = f"{id}-dev" + else: + refID = f"ref-for-{id}" el.set("id", safeID(doc, refID)) if i == 0: appendChild( diff --git a/bikeshed/h/dom.py b/bikeshed/h/dom.py index 9e5ab13f4c..e32ab440b6 100644 --- a/bikeshed/h/dom.py +++ b/bikeshed/h/dom.py @@ -803,7 +803,7 @@ def dedupIDs(doc): continue if el.get("data-silently-dedup") is not None: warnAboutDupes = False - if dupeId.startswith("ref-for-"): + if dupeId.startswith("ref-for-") or dupeId.endswith("-dev"): warnAboutDupes = False # Try to de-dup the id by appending an integer after it. if warnAboutDupes: diff --git a/bikeshed/unsortedJunk.py b/bikeshed/unsortedJunk.py index 7e1b5e3af0..e7a59569cc 100644 --- a/bikeshed/unsortedJunk.py +++ b/bikeshed/unsortedJunk.py @@ -1072,7 +1072,10 @@ def decorateAutolink(doc, el, linkType, linkText, ref): if el.get("id") is None: _, _, id = ref.url.partition("#") if id: - el.set("id", f"ref-for-{id}") + if (hasAncestor(el, lambda x: hasClass(x, "domintro"))): + el.set("id", f"{id}-dev") + else: + el.set("id", f"ref-for-{id}") el.set("data-silently-dedup", "") # Get all the values that the type expands to, add it as a title.