Skip to content

Commit

Permalink
Update note on "url" being used as a selector
Browse files Browse the repository at this point in the history
  • Loading branch information
tidoust committed Jan 20, 2025
1 parent e27dc65 commit 4199573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bikeshed/cddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ def markupCDDLBlock(pre: t.ElementT, doc: t.SpecT) -> set[t.ElementT]:
del el.attrib["data-cddl-for"]
else:
# Copy over the auto-generated linking text to the manual dfn.
# Note: "url" is not an absolute URL but rather a fragment ref. It
# can thus be used as an ID selector to find the underlying dfn
dfn = h.find(url, doc)
# How in the hell does this work, the url is not a selector???
assert dfn is not None
lts = combineCDDLLinkingTexts(el.get("data-lt"), dfn.get("data-lt"))
dfn.set("data-lt", lts)
Expand Down

0 comments on commit 4199573

Please sign in to comment.