Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoxxyz <foxxyz@gmail.com>2021-07-05 06:39:17 +0300
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2021-08-30 01:40:20 +0300
commit6fdd5827f0956ffc4e7ffe31babaf530e42f75b9 (patch)
tree1e0ccc64f99d288e3ed80119c53a1aac1c33348e /doc/api/n-api.md
parentb6b638bdd69e4bd07140497c026cdf0aba8dd544 (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/n-api.md')
-rw-r--r--doc/api/n-api.md132
1 files changed, 66 insertions, 66 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index d06cbd1ba70..f9ce2bca436 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -6007,14 +6007,14 @@ the add-on's file name during loading.
[CMake]: https://cmake.org
[CMake.js]: https://github.com/cmake-js/cmake-js
[ECMAScript Language Specification]: https://tc39.github.io/ecma262/
-[Error handling]: #n_api_error_handling
+[Error handling]: #error-handling
[GCC]: https://gcc.gnu.org
[GYP]: https://gyp.gsrc.io
[GitHub releases]: https://help.github.com/en/github/administering-a-repository/about-releases
[LLVM]: https://llvm.org
[Native Abstractions for Node.js]: https://github.com/nodejs/nan
-[Object lifetime management]: #n_api_object_lifetime_management
-[Object wrap]: #n_api_object_wrap
+[Object lifetime management]: #object-lifetime-management
+[Object wrap]: #object-wrap
[Section 12.10.4]: https://tc39.github.io/ecma262/#sec-instanceofoperator
[Section 12.5.5]: https://tc39.github.io/ecma262/#sec-typeof-operator
[Section 19.2]: https://tc39.github.io/ecma262/#sec-function-objects
@@ -6044,79 +6044,79 @@ the add-on's file name during loading.
[Section 9.1.6]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc
[Travis CI]: https://travis-ci.org
[Visual Studio]: https://visualstudio.microsoft.com
-[Working with JavaScript properties]: #n_api_working_with_javascript_properties
+[Working with JavaScript properties]: #working-with-javascript-properties
[Xcode]: https://developer.apple.com/xcode/
[`Number.MAX_SAFE_INTEGER`]: https://tc39.github.io/ecma262/#sec-number.max_safe_integer
[`Number.MIN_SAFE_INTEGER`]: https://tc39.github.io/ecma262/#sec-number.min_safe_integer
-[`Worker`]: worker_threads.md#worker_threads_class_worker
-[`async_hooks.executionAsyncResource()`]: async_hooks.md#async_hooks_async_hooks_executionasyncresource
-[`global`]: globals.md#globals_global
-[`init` hooks]: async_hooks.md#async_hooks_init_asyncid_type_triggerasyncid_resource
-[`napi_add_async_cleanup_hook`]: #n_api_napi_add_async_cleanup_hook
-[`napi_add_env_cleanup_hook`]: #n_api_napi_add_env_cleanup_hook
-[`napi_add_finalizer`]: #n_api_napi_add_finalizer
-[`napi_async_cleanup_hook`]: #n_api_napi_async_cleanup_hook
-[`napi_async_complete_callback`]: #n_api_napi_async_complete_callback
-[`napi_async_destroy`]: #n_api_napi_async_destroy
-[`napi_async_init`]: #n_api_napi_async_init
-[`napi_callback`]: #n_api_napi_callback
-[`napi_cancel_async_work`]: #n_api_napi_cancel_async_work
-[`napi_close_callback_scope`]: #n_api_napi_close_callback_scope
-[`napi_close_escapable_handle_scope`]: #n_api_napi_close_escapable_handle_scope
-[`napi_close_handle_scope`]: #n_api_napi_close_handle_scope
-[`napi_create_async_work`]: #n_api_napi_create_async_work
-[`napi_create_error`]: #n_api_napi_create_error
-[`napi_create_external_arraybuffer`]: #n_api_napi_create_external_arraybuffer
-[`napi_create_range_error`]: #n_api_napi_create_range_error
-[`napi_create_reference`]: #n_api_napi_create_reference
-[`napi_create_type_error`]: #n_api_napi_create_type_error
-[`napi_define_class`]: #n_api_napi_define_class
-[`napi_delete_async_work`]: #n_api_napi_delete_async_work
-[`napi_delete_reference`]: #n_api_napi_delete_reference
-[`napi_escape_handle`]: #n_api_napi_escape_handle
-[`napi_finalize`]: #n_api_napi_finalize
-[`napi_get_and_clear_last_exception`]: #n_api_napi_get_and_clear_last_exception
-[`napi_get_array_length`]: #n_api_napi_get_array_length
-[`napi_get_element`]: #n_api_napi_get_element
-[`napi_get_last_error_info`]: #n_api_napi_get_last_error_info
-[`napi_get_property`]: #n_api_napi_get_property
-[`napi_get_reference_value`]: #n_api_napi_get_reference_value
-[`napi_get_value_external`]: #n_api_napi_get_value_external
-[`napi_has_property`]: #n_api_napi_has_property
-[`napi_instanceof`]: #n_api_napi_instanceof
-[`napi_is_error`]: #n_api_napi_is_error
-[`napi_is_exception_pending`]: #n_api_napi_is_exception_pending
-[`napi_make_callback`]: #n_api_napi_make_callback
-[`napi_open_callback_scope`]: #n_api_napi_open_callback_scope
-[`napi_open_escapable_handle_scope`]: #n_api_napi_open_escapable_handle_scope
-[`napi_open_handle_scope`]: #n_api_napi_open_handle_scope
-[`napi_property_attributes`]: #n_api_napi_property_attributes
-[`napi_property_descriptor`]: #n_api_napi_property_descriptor
-[`napi_queue_async_work`]: #n_api_napi_queue_async_work
-[`napi_reference_ref`]: #n_api_napi_reference_ref
-[`napi_reference_unref`]: #n_api_napi_reference_unref
-[`napi_remove_async_cleanup_hook`]: #n_api_napi_remove_async_cleanup_hook
-[`napi_remove_env_cleanup_hook`]: #n_api_napi_remove_env_cleanup_hook
-[`napi_set_instance_data`]: #n_api_napi_set_instance_data
-[`napi_set_property`]: #n_api_napi_set_property
-[`napi_threadsafe_function_call_js`]: #n_api_napi_threadsafe_function_call_js
-[`napi_throw_error`]: #n_api_napi_throw_error
-[`napi_throw_range_error`]: #n_api_napi_throw_range_error
-[`napi_throw_type_error`]: #n_api_napi_throw_type_error
-[`napi_throw`]: #n_api_napi_throw
-[`napi_unwrap`]: #n_api_napi_unwrap
-[`napi_wrap`]: #n_api_napi_wrap
+[`Worker`]: worker_threads.md#class-worker
+[`async_hooks.executionAsyncResource()`]: async_hooks.md#async_hooksexecutionasyncresource
+[`global`]: globals.md#global
+[`init` hooks]: async_hooks.md#initasyncid-type-triggerasyncid-resource
+[`napi_add_async_cleanup_hook`]: #napi_add_async_cleanup_hook
+[`napi_add_env_cleanup_hook`]: #napi_add_env_cleanup_hook
+[`napi_add_finalizer`]: #napi_add_finalizer
+[`napi_async_cleanup_hook`]: #napi_async_cleanup_hook
+[`napi_async_complete_callback`]: #napi_async_complete_callback
+[`napi_async_destroy`]: #napi_async_destroy
+[`napi_async_init`]: #napi_async_init
+[`napi_callback`]: #napi_callback
+[`napi_cancel_async_work`]: #napi_cancel_async_work
+[`napi_close_callback_scope`]: #napi_close_callback_scope
+[`napi_close_escapable_handle_scope`]: #napi_close_escapable_handle_scope
+[`napi_close_handle_scope`]: #napi_close_handle_scope
+[`napi_create_async_work`]: #napi_create_async_work
+[`napi_create_error`]: #napi_create_error
+[`napi_create_external_arraybuffer`]: #napi_create_external_arraybuffer
+[`napi_create_range_error`]: #napi_create_range_error
+[`napi_create_reference`]: #napi_create_reference
+[`napi_create_type_error`]: #napi_create_type_error
+[`napi_define_class`]: #napi_define_class
+[`napi_delete_async_work`]: #napi_delete_async_work
+[`napi_delete_reference`]: #napi_delete_reference
+[`napi_escape_handle`]: #napi_escape_handle
+[`napi_finalize`]: #napi_finalize
+[`napi_get_and_clear_last_exception`]: #napi_get_and_clear_last_exception
+[`napi_get_array_length`]: #napi_get_array_length
+[`napi_get_element`]: #napi_get_element
+[`napi_get_last_error_info`]: #napi_get_last_error_info
+[`napi_get_property`]: #napi_get_property
+[`napi_get_reference_value`]: #napi_get_reference_value
+[`napi_get_value_external`]: #napi_get_value_external
+[`napi_has_property`]: #napi_has_property
+[`napi_instanceof`]: #napi_instanceof
+[`napi_is_error`]: #napi_is_error
+[`napi_is_exception_pending`]: #napi_is_exception_pending
+[`napi_make_callback`]: #napi_make_callback
+[`napi_open_callback_scope`]: #napi_open_callback_scope
+[`napi_open_escapable_handle_scope`]: #napi_open_escapable_handle_scope
+[`napi_open_handle_scope`]: #napi_open_handle_scope
+[`napi_property_attributes`]: #napi_property_attributes
+[`napi_property_descriptor`]: #napi_property_descriptor
+[`napi_queue_async_work`]: #napi_queue_async_work
+[`napi_reference_ref`]: #napi_reference_ref
+[`napi_reference_unref`]: #napi_reference_unref
+[`napi_remove_async_cleanup_hook`]: #napi_remove_async_cleanup_hook
+[`napi_remove_env_cleanup_hook`]: #napi_remove_env_cleanup_hook
+[`napi_set_instance_data`]: #napi_set_instance_data
+[`napi_set_property`]: #napi_set_property
+[`napi_threadsafe_function_call_js`]: #napi_threadsafe_function_call_js
+[`napi_throw_error`]: #napi_throw_error
+[`napi_throw_range_error`]: #napi_throw_range_error
+[`napi_throw_type_error`]: #napi_throw_type_error
+[`napi_throw`]: #napi_throw
+[`napi_unwrap`]: #napi_unwrap
+[`napi_wrap`]: #napi_wrap
[`node-addon-api`]: https://github.com/nodejs/node-addon-api
[`node_api.h`]: https://github.com/nodejs/node/blob/HEAD/src/node_api.h
-[`process.release`]: process.md#process_process_release
+[`process.release`]: process.md#processrelease
[`uv_ref`]: https://docs.libuv.org/en/v1.x/handle.html#c.uv_ref
[`uv_unref`]: https://docs.libuv.org/en/v1.x/handle.html#c.uv_unref
-[async_hooks `type`]: async_hooks.md#async_hooks_type
-[context-aware addons]: addons.md#addons_context_aware_addons
+[async_hooks `type`]: async_hooks.md#type
+[context-aware addons]: addons.md#context-aware-addons
[docs]: https://github.com/nodejs/node-addon-api#api-documentation
[global scope]: globals.md
[gyp-next]: https://github.com/nodejs/gyp-next
-[module scope]: modules.md#modules_the_module_scope
+[module scope]: modules.md#the-module-scope
[node-gyp]: https://github.com/nodejs/node-gyp
[node-pre-gyp]: https://github.com/mapbox/node-pre-gyp
[prebuild]: https://github.com/prebuild/prebuild