From 621c03acfe13e6280a1e6e14432f999d96bd27f7 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Wed, 9 Aug 2017 00:16:41 -0400 Subject: [PATCH] doc: delint PR-URL: https://github.com/nodejs/node/pull/14707 Refs: https://github.com/nodejs/node/pull/12756 Reviewed-By: Luigi Pinca Reviewed-By: Daijiro Wachi Reviewed-By: Sakthipriyan Vairamani --- doc/api/http2.md | 18 +++++++++--------- doc/api/n-api.md | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index cd034c5db882c0..78e2fad23a884b 100755 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1850,8 +1850,8 @@ const server = http2.createServer((req, res) => { }); ``` -In order to create a mixed [HTTPS](https) and HTTP/2 server, refer to the -[ALPN negotiation](alpn-negotiation) section. +In order to create a mixed [HTTPS][] and HTTP/2 server, refer to the +[ALPN negotiation][] section. Upgrading from non-tls HTTP/1 servers is not supported. The HTTP2 compatibility API is composed of [`Http2ServerRequest`]() and @@ -1861,10 +1861,10 @@ the status message for HTTP codes is ignored. ### ALPN negotiation -ALPN negotiation allows to support both [HTTPS](https) and HTTP/2 over +ALPN negotiation allows to support both [HTTPS][] and HTTP/2 over the same socket. The `req` and `res` objects can be either HTTP/1 or HTTP/2, and an application **must** restrict itself to the public API of -[HTTP/1](), and detect if it is possible to use the more advanced +[HTTP/1][], and detect if it is possible to use the more advanced features of HTTP/2. The following example creates a server that supports both protocols: @@ -1925,7 +1925,7 @@ abnormally aborted in mid-communication. added: REPLACEME --> -Indicates that the underlying [`Http2Stream`]() was closed. +Indicates that the underlying [`Http2Stream`][] was closed. Just like `'end'`, this event occurs only once per response. #### request.destroy([error]) @@ -1935,7 +1935,7 @@ added: REPLACEME * `error` {Error} -Calls `destroy()` on the [Http2Stream]() that received the `ServerRequest`. If +Calls `destroy()` on the [`Http2Stream`][] that received the [`ServerRequest`][]. If `error` is provided, an `'error'` event is emitted and `error` is passed as an argument to any listeners on the event. @@ -2570,7 +2570,7 @@ will result in a [`TypeError`][] being thrown. added: REPLACEME --> -Call [`stream.pushStream()`]() with the given headers, and wraps the +Call [`stream.pushStream()`][] with the given headers, and wraps the given newly created [`Http2Stream`] on `Http2ServerRespose`. The callback will be called with an error with code `ERR_HTTP2_STREAM_CLOSED` @@ -2578,13 +2578,13 @@ if the stream is closed. [HTTP/2]: https://tools.ietf.org/html/rfc7540 [HTTP/1]: http.html -[https]: https.html +[HTTPS]: https.html [`net.Socket`]: net.html [`tls.TLSSocket`]: tls.html [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener [`ClientHttp2Stream`]: #http2_class_clienthttp2stream [Compatibility API]: #http2_compatibility_api -[alpn-negotiation]: #http2_alpn_negotiation +[ALPN negotiation]: #http2_alpn_negotiation [`Duplex`]: stream.html#stream_class_stream_duplex [Headers Object]: #http2_headers_object [`Http2Stream`]: #http2_class_http2stream diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 9e7fdd9301332e..04af7a62723c70 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -342,7 +342,7 @@ to be added to the error object. If the optional parameter is NULL then no code will be associated with the error. If a code is provided, the name associated with the error is also updated to be: -``` +```text originalName [code] ``` @@ -350,7 +350,7 @@ where originalName is the original name associated with the error and code is the code that was provided. For example if the code is 'ERR_ERROR_1' and a TypeError is being created the name will be: -``` +```text TypeError [ERR_ERROR_1] ``` @@ -3342,6 +3342,8 @@ support it: * If the function is not available, provide an alternate implementation that does not use the function. + + [Asynchronous Operations]: #n_api_asynchronous_operations [Basic N-API Data Types]: #n_api_basic_n_api_data_types [ECMAScript Language Specification]: https://tc39.github.io/ecma262/