diff options
| author | foxxyz <foxxyz@gmail.com> | 2021-07-04 20:39:17 -0700 |
|---|---|---|
| committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-08-30 00:40:20 +0200 |
| commit | 6fdd5827f0956ffc4e7ffe31babaf530e42f75b9 (patch) | |
| tree | 1e0ccc64f99d288e3ed80119c53a1aac1c33348e /doc/api/path.md | |
| parent | b6b638bdd69e4bd07140497c026cdf0aba8dd544 (diff) | |
| download | node-new-6fdd5827f0956ffc4e7ffe31babaf530e42f75b9.tar.gz | |
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/path.md')
| -rw-r--r-- | doc/api/path.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/path.md b/doc/api/path.md index 839c45da90..8dc3f4558a 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -588,9 +588,9 @@ of the `path` methods. The API is accessible via `require('path').win32` or `require('path/win32')`. [MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths -[`TypeError`]: errors.md#errors_class_typeerror -[`path.parse()`]: #path_path_parse_path -[`path.posix`]: #path_path_posix -[`path.sep`]: #path_path_sep -[`path.win32`]: #path_path_win32 +[`TypeError`]: errors.md#class-typeerror +[`path.parse()`]: #pathparsepath +[`path.posix`]: #pathposix +[`path.sep`]: #pathsep +[`path.win32`]: #pathwin32 [namespace-prefixed path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#namespaces |
