镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Commit bc2d1c9

Browse files
thefourtheyeevanlucas
authored andcommitted
doc: do not link in the headings
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>
1 parent 90aac7c commit bc2d1c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎doc/api/buffer.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ $ node --zero-fill-buffers
124124
<Buffer 00 00 00 00 00>
125125
```
126126

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

129129
When calling [`Buffer.allocUnsafe()`] and [`Buffer.allocUnsafeSlow()`], the
130130
segment of allocated memory is *uninitialized* (it is not zeroed-out). While

0 commit comments

Comments
 (0)