bikeshed
bikeshed copied to clipboard
Support linking to steps.
Specifications often have algorithms with many (nested) ordered lists. In those algorithms, steps often refer to other steps by number. But those numbers currently have to be maintained manually and, when steps are inserted, that can lead to a cascade of updated step number references below. Worse, when two changes are in-flight to the same algorithm, the step numbers are almost ensured to go wrong because neither change need textually conflict with the other.
This change to bikeshed permits items in an ordered list to be given an ID and referenced by name.
- This is a traditional item.
- {#myid} This is an item with an ID.
- This item references [[#myid]].
The reference is turned into the string “step 2”. This also works for nested steps where the reference will say something like “step 2.1.3”.
I have no idea what I'm doing, and sticking information in HTML attributes like this for later consumption is probably silly, but this issue comes up a bunch for WebAuthn / CTAP stuff and I figured I'd give this a shot.
@equalsJeffH to see whether I'm actually solving the right problem, or whether what we need is slightly different.
to see whether I'm actually solving the right problem, or whether what we need is slightly different
Thanks for doing this. I'll have to figure out how to play with it once we ship the current on-deadline spec.
Nominally, what this supplies appears useful, especially if the resultant HTML is correct. We've been up-to-this-point hacking this sort of thing into bikeshed source by using explict <li id="foo">
markup, but bikeshed does weird things with that—such as altering the depth of the list item—more than occasionally such that the latter technique is not reliable, unfortunately. If this provides reliable results, then it is definitely useful.
Thanks, but we won't delay RD02 to refactor quire yet if that is OK.
This will save a bunch of time and mistakes later.