diff options
author | foxxyz <foxxyz@gmail.com> | 2021-07-05 06:39:17 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-08-30 01:40:20 +0300 |
commit | 6fdd5827f0956ffc4e7ffe31babaf530e42f75b9 (patch) | |
tree | 1e0ccc64f99d288e3ed80119c53a1aac1c33348e /doc/api/zlib.md | |
parent | b6b638bdd69e4bd07140497c026cdf0aba8dd544 (diff) |
doc: anchor link parity between markdown and html-generated docs
Main changes:
- Replace current HTML anchor generation to match
header anchor generation in Github markdown.
- Remove unnecessary double namespacing on generated anchors/links (E.G.
`esm.md#loaders` instead of `esm.md#esm_loaders`).
- Anchors/links are automatically prefixed with their respective modules
when concatenated for usage in `all.html`.
Benefits:
- All anchor links within and between markdown API docs actually work.
- Adding new anchor links no longer requires contributors to generate
the HTML docs first to look up the correct anchors.
- Anchors are much shorter.
- All previous anchor links are preserved by generating hidden legacy
anchors.
PR-URL: https://github.com/nodejs/node/pull/39304
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'doc/api/zlib.md')
-rw-r--r-- | doc/api/zlib.md | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 3187195a0e0..a2ce8fe682f 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -1171,30 +1171,30 @@ changes: Decompress a chunk of data with [`Unzip`][]. -[Brotli parameters]: #zlib_brotli_constants -[Memory usage tuning]: #zlib_memory_usage_tuning +[Brotli parameters]: #brotli-constants +[Memory usage tuning]: #memory-usage-tuning [RFC 7932]: https://www.rfc-editor.org/rfc/rfc7932.txt [Streams API]: stream.md -[`.flush()`]: #zlib_zlib_flush_kind_callback +[`.flush()`]: #zlibflushkind-callback [`Accept-Encoding`]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 [`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer -[`BrotliCompress`]: #zlib_class_zlib_brotlicompress -[`BrotliDecompress`]: #zlib_class_zlib_brotlidecompress -[`Buffer`]: buffer.md#buffer_class_buffer +[`BrotliCompress`]: #class-zlibbrotlicompress +[`BrotliDecompress`]: #class-zlibbrotlidecompress +[`Buffer`]: buffer.md#class-buffer [`Content-Encoding`]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 [`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView -[`DeflateRaw`]: #zlib_class_zlib_deflateraw -[`Deflate`]: #zlib_class_zlib_deflate -[`Gunzip`]: #zlib_class_zlib_gunzip -[`Gzip`]: #zlib_class_zlib_gzip -[`InflateRaw`]: #zlib_class_zlib_inflateraw -[`Inflate`]: #zlib_class_zlib_inflate +[`DeflateRaw`]: #class-zlibdeflateraw +[`Deflate`]: #class-zlibdeflate +[`Gunzip`]: #class-zlibgunzip +[`Gzip`]: #class-zlibgzip +[`InflateRaw`]: #class-zlibinflateraw +[`Inflate`]: #class-zlibinflate [`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray -[`Unzip`]: #zlib_class_zlib_unzip -[`buffer.kMaxLength`]: buffer.md#buffer_buffer_kmaxlength +[`Unzip`]: #class-zlibunzip +[`buffer.kMaxLength`]: buffer.md#bufferkmaxlength [`deflateInit2` and `inflateInit2`]: https://zlib.net/manual.html#Advanced -[`stream.Transform`]: stream.md#stream_class_stream_transform -[`zlib.bytesWritten`]: #zlib_zlib_byteswritten -[convenience methods]: #zlib_convenience_methods +[`stream.Transform`]: stream.md#class-streamtransform +[`zlib.bytesWritten`]: #zlibbyteswritten +[convenience methods]: #convenience-methods [zlib documentation]: https://zlib.net/manual.html#Constants -[zlib.createGzip example]: #zlib_zlib +[zlib.createGzip example]: #zlib |