documentation
documentation copied to clipboard
[BUG] Link to field `description` on article `package.json` is broken
What / Why

When
Scroll down to the section description (not Description above)
Where
https://docs.npmjs.com/cli/v7/configuring-npm/package-json
How
URLs don't care about casing so the HTML anchor is ambiguous. Interestingly, the ToC uses a better strategy for creating unique anchors but the HTML content itself does not adopt this strategy.
Current Behavior
Cannot create a valid link to the field description
Steps to Reproduce
Option 1: Click here
Option 2: Click on description here

Expected Behavior
Option 1: Link is invalid Option 2: Link refers to wrong section
This is a known problem with a proposed PR here. Not sure if removing the original "description" is the solution here though.
The proposed solution was not the right one, this is something that is going to need to be fixed in the docs site itself. It should be able to handle this (in fact the t.o.c appears to already try)
@wraithgar what are you imagining the next steps here are"?
@MylesBorins I have no idea where to start. There seems to be a bug with whatever markdown rendering library is being used when there are headers w/ duplicate names. The table of contents does it correctly, but the page itself does not.
Github's markdown renderer also does not have this bug https://github.com/npm/cli/blob/latest/docs/content/configuring-npm/package-json.md#description-1