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/globals.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/globals.md')
-rw-r--r-- | doc/api/globals.md | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/doc/api/globals.md b/doc/api/globals.md index a6ae338e7b5..79f0932b181 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -440,31 +440,31 @@ The object that acts as the namespace for all W3C [`AbortController`]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController [`DOMException`]: https://developer.mozilla.org/en-US/docs/Web/API/DOMException -[`EventTarget` and `Event` API]: events.md#event-target-and-event-api -[`MessageChannel`]: worker_threads.md#worker_threads_class_messagechannel +[`EventTarget` and `Event` API]: events.md#eventtarget-and-event-api +[`MessageChannel`]: worker_threads.md#class-messagechannel [`MessageEvent`]: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent -[`MessagePort`]: worker_threads.md#worker_threads_class_messageport -[`TextDecoder`]: util.md#util_class_util_textdecoder -[`TextEncoder`]: util.md#util_class_util_textencoder -[`URLSearchParams`]: url.md#url_class_urlsearchparams -[`URL`]: url.md#url_class_url -[`__dirname`]: modules.md#modules_dirname -[`__filename`]: modules.md#modules_filename -[`buffer.atob()`]: buffer.md#buffer_buffer_atob_data -[`buffer.btoa()`]: buffer.md#buffer_buffer_btoa_data -[`clearImmediate`]: timers.md#timers_clearimmediate_immediate -[`clearInterval`]: timers.md#timers_clearinterval_timeout -[`clearTimeout`]: timers.md#timers_cleartimeout_timeout +[`MessagePort`]: worker_threads.md#class-messageport +[`TextDecoder`]: util.md#class-utiltextdecoder +[`TextEncoder`]: util.md#class-utiltextencoder +[`URLSearchParams`]: url.md#class-urlsearchparams +[`URL`]: url.md#class-url +[`__dirname`]: modules.md#__dirname +[`__filename`]: modules.md#__filename +[`buffer.atob()`]: buffer.md#bufferatobdata +[`buffer.btoa()`]: buffer.md#bufferbtoadata +[`clearImmediate`]: timers.md#clearimmediateimmediate +[`clearInterval`]: timers.md#clearintervaltimeout +[`clearTimeout`]: timers.md#cleartimeouttimeout [`console`]: console.md -[`exports`]: modules.md#modules_exports -[`module`]: modules.md#modules_module -[`perf_hooks.performance`]: perf_hooks.md#perf_hooks_perf_hooks_performance -[`process.nextTick()`]: process.md#process_process_nexttick_callback_args -[`process` object]: process.md#process_process -[`require()`]: modules.md#modules_require_id -[`setImmediate`]: timers.md#timers_setimmediate_callback_args -[`setInterval`]: timers.md#timers_setinterval_callback_delay_args -[`setTimeout`]: timers.md#timers_settimeout_callback_delay_args +[`exports`]: modules.md#exports +[`module`]: modules.md#module +[`perf_hooks.performance`]: perf_hooks.md#perf_hooksperformance +[`process.nextTick()`]: process.md#processnexttickcallback-args +[`process` object]: process.md#process +[`require()`]: modules.md#requireid +[`setImmediate`]: timers.md#setimmediatecallback-args +[`setInterval`]: timers.md#setintervalcallback-delay-args +[`setTimeout`]: timers.md#settimeoutcallback-delay-args [buffer section]: buffer.md [built-in objects]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects [module system documentation]: modules.md |