speced / speced/respec

Multiple dfns with same text but different `data-dfn-for`s number their ids

Open
#4,415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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://github.com/w3c/hr-time/issues/156

<dfn data-export="" data-dfn-for="wall clock">unsafe current time</dfn>

produces https://w3c.github.io/hr-time/#dfn-unsafe-current-time-0, and

<dfn data-export="" data-dfn-for="monotonic clock">unsafe current time</dfn>

produces https://w3c.github.io/hr-time/#dfn-unsafe-current-time-1. The ids should instead include the data-dfn-for value since that's how specifications disambiguate. For backward-compatibility, this should probably only happen if a spec includes two definitions with the same text and different for values.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two affected definition examples in w3c/hr-time/index.html at lines 259-260 and 272-273, then trace how ReSpec generates their IDs. Done means duplicate definition text with different data-dfn-for values includes the for value in the IDs, while existing IDs remain unchanged when no such conflict exists.

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
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.