Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: buffer TOC incorrectly contains brackets #9331

Closed
mscdex opened this issue Oct 27, 2016 · 2 comments
Closed

doc: buffer TOC incorrectly contains brackets #9331

mscdex opened this issue Oct 27, 2016 · 2 comments
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.

Comments

@mscdex
Copy link
Contributor

mscdex commented Oct 27, 2016

  • Version: master, v6.x
  • Platform: n/a
  • Subsystem: doc

In the buffer doc TOC there is an entry called 'What makes [Buffer.allocUnsafe()] and [Buffer.allocUnsafeSlow()] "unsafe"?'. The brackets there should not be visible. The brackets do not exist in the v4.x docs. If I had to take a wild guess I would say the brackets were introduced when the 'deprecated' tags were added to every doc pages' TOC, as that is the immediate obvious difference between the buffer doc TOC in v4.x and v6.x/latest.

@mscdex mscdex added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Oct 27, 2016
@silverwind
Copy link
Contributor

Reverting fcee4d4 does not fix it. Must be something else.

@thefourtheye
Copy link
Contributor

I found a way to fix the HTML generation so that the links will be visible. But the problem is, each and every part of the link will be pointing to different things. "What makes" will point to the actual section, allocUnsafe and allocUnsafeSlow will point to their corresponding sections, "and" and "unsafe" will point to the actual section. That would be quite confusing, I guess.

thefourtheye added a commit to thefourtheye/io.js that referenced this issue Nov 2, 2016
If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

Fixes: nodejs#9331
evanlucas pushed a commit that referenced this issue Nov 7, 2016
If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

PR-URL: #9416
Fixes: #9331

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this issue Nov 11, 2016
If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

PR-URL: #9416
Fixes: #9331

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants