Sections getting different ids from their headings
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
Description of problem
URL to affected spec or repo:
https://w3ctag.github.io/privacy-principles/#hl-sensitive-information
What happened (e.g., it crashed)?:
The source for this heading is
## Sensitive Information {#hl-sensitive-information}
This generates:
<section id="sensitive-information"><div class="header-wrapper">
<h3 id="hl-sensitive-information"><bdi class="secno">2.4 </bdi>Sensitive Information</h3>
<a class="self-link" href="#hl-sensitive-information" aria-label="Permalink for Section 2.4"></a> ...
This causes https://w3c.github.io/webref/ed/headings/privacy-principles.json to omit the id that the self-link refers to. (Filed as https://github.com/w3c/reffy/issues/1824)
Expected behavior (e.g., it shouldn't crash):
Only 1 id should be generated for this section/heading, and it should match the id assigned by the custom heading id.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the heading case from the linked privacy-principles index.html source, including ## Sensitive Information {#hl-sensitive-information}. Trace ReSpec’s heading generation and custom heading ID handling, then verify the rendered section and heading produce one matching id and that the resulting headings JSON retains the self-link target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100