-
-
Notifications
You must be signed in to change notification settings - Fork 30
Fields all generate a broken anchor link #2713
Description
Describe the bug
All the object fields, enum members, and so on, are rendered as links pointing to #. It seems that this is caused by printer-legacy using printSectionItem which in turn calls printLink that uses toLink which falls back to #.
Clicking those links scrolls the page to the top, which is frustrating (especially if you wanted to click on a permalink instead).
To Reproduce
Generate markdown for an object type (I'm using the Docusaurus formatter but I'm pretty sure the behavior is almost identical for the generic one, Docusaurus only overwrites formatMDXNameEntity which is used as the link text).
Expected behavior
I'd like to either entirely skip generating a link or generate one that is identical to the permalink, so clicking it does not scroll away and the link can be used for sharing.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Im not sure using printLink for items that are on the same page is needed, although generating working anchors within that same document would be a welcome change. See below for an example:
### Fields
#### <a name="fields-id"></a>[<code>Whatever.id</code>](#fields-id)<Bullet />...
The ID of the object.