From 292dd0714c287b418f629ed964e7a2f3b9396e08 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 16 Jul 2016 00:35:38 +0200 Subject: [PATCH] doc: use blockquotes for Stability: markers Use blockquotes instead of code blocks for stability markers in the docs. Doing that: - Makes the makers appear correctly when viewed e.g. on github. - Allows remark-lint rules like `no-undefined-references` to work properly (https://github.com/nodejs/node/pull/7729). --- doc/api/assert.md | 2 +- doc/api/buffer.md | 34 +++++++++++++++--------------- doc/api/child_process.md | 2 +- doc/api/cluster.md | 4 ++-- doc/api/console.md | 2 +- doc/api/crypto.md | 6 +++--- doc/api/debugger.md | 2 +- doc/api/dgram.md | 2 +- doc/api/dns.md | 2 +- doc/api/documentation.md | 42 +++++++++++++++---------------------- doc/api/domain.md | 4 ++-- doc/api/events.md | 4 ++-- doc/api/fs.md | 8 +++---- doc/api/globals.md | 2 +- doc/api/http.md | 4 ++-- doc/api/https.md | 2 +- doc/api/modules.md | 2 +- doc/api/net.md | 4 ++-- doc/api/os.md | 2 +- doc/api/path.md | 2 +- doc/api/punycode.md | 2 +- doc/api/querystring.md | 2 +- doc/api/readline.md | 2 +- doc/api/repl.md | 4 ++-- doc/api/stream.md | 2 +- doc/api/string_decoder.md | 2 +- doc/api/timers.md | 2 +- doc/api/tls.md | 8 +++---- doc/api/tty.md | 2 +- doc/api/url.md | 2 +- doc/api/util.md | 44 +++++++++++++++++++-------------------- doc/api/vm.md | 2 +- doc/api/zlib.md | 2 +- tools/doc/README.md | 2 +- tools/doc/html.js | 11 +++++++++- tools/doc/json.js | 20 ++++++++++++++---- 36 files changed, 127 insertions(+), 114 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index bc5c0b833ae5aa..9ce4a69ef4f311 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -1,6 +1,6 @@ # Assert - Stability: 3 - Locked +> Stability: 3 - Locked The `assert` module provides a simple set of assertion tests that can be used to test invariants. The module is intended for internal use by Node.js, but can be diff --git a/doc/api/buffer.md b/doc/api/buffer.md index bd982dfabafe91..cd1a0b8fbc4bfa 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1,6 +1,6 @@ # Buffer - Stability: 2 - Stable +> Stability: 2 - Stable Prior to the introduction of `TypedArray` in ECMAScript 2015 (ES6), the JavaScript language had no mechanism for reading or manipulating streams @@ -277,8 +277,8 @@ It can be constructed in a variety of ways. deprecated: v6.0.0 --> - Stability: 0 - Deprecated: Use [`Buffer.from(array)`][buffer_from_array] - instead. +> Stability: 0 - Deprecated: Use [`Buffer.from(array)`][buffer_from_array] +> instead. * `array` {Array} @@ -295,8 +295,8 @@ const buf = new Buffer([0x62,0x75,0x66,0x66,0x65,0x72]); deprecated: v6.0.0 --> - Stability: 0 - Deprecated: Use [`Buffer.from(buffer)`][buffer_from_buffer] - instead. +> Stability: 0 - Deprecated: Use [`Buffer.from(buffer)`][buffer_from_buffer] +> instead. * `buffer` {Buffer} @@ -318,9 +318,9 @@ console.log(buf2.toString()); deprecated: v6.0.0 --> - Stability: 0 - Deprecated: Use - [`Buffer.from(arrayBuffer[, byteOffset [, length]])`][buffer_from_arraybuf] - instead. +> Stability: 0 - Deprecated: Use +> [`Buffer.from(arrayBuffer[, byteOffset [, length]])`][buffer_from_arraybuf] +> instead. * `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or a `new ArrayBuffer()` @@ -356,9 +356,9 @@ console.log(buf); deprecated: v6.0.0 --> - Stability: 0 - Deprecated: Use - [`Buffer.alloc(size[, fill[, encoding]])`][buffer_alloc] instead (also - see [`Buffer.allocUnsafe(size)`][buffer_allocunsafe]). +> Stability: 0 - Deprecated: Use +> [`Buffer.alloc(size[, fill[, encoding]])`][buffer_alloc] instead (also +> see [`Buffer.allocUnsafe(size)`][buffer_allocunsafe]). * `size` {Number} @@ -388,8 +388,8 @@ console.log(buf); deprecated: v6.0.0 --> - Stability: 0 - Deprecated: - Use [`Buffer.from(str[, encoding])`][buffer_from_string] instead. +> Stability: 0 - Deprecated: +> Use [`Buffer.from(str[, encoding])`][buffer_from_string] instead. * `str` {String} string to encode. * `encoding` {String} Default: `'utf8'` @@ -1954,8 +1954,8 @@ Note that this is a property on the `buffer` module as returned by deprecated: v6.0.0 --> - Stability: 0 - Deprecated: Use - [`Buffer.allocUnsafeSlow(size)`][buffer_allocunsafeslow] instead. +> Stability: 0 - Deprecated: Use +> [`Buffer.allocUnsafeSlow(size)`][buffer_allocunsafeslow] instead. Returns an un-pooled `Buffer`. @@ -1990,8 +1990,8 @@ has observed undue memory retention in their applications. deprecated: v6.0.0 --> - Stability: 0 - Deprecated: Use - [`Buffer.allocUnsafeSlow(size)`][buffer_allocunsafeslow] instead. +> Stability: 0 - Deprecated: Use +> [`Buffer.allocUnsafeSlow(size)`][buffer_allocunsafeslow] instead. * `size` Number diff --git a/doc/api/child_process.md b/doc/api/child_process.md index e79b411e91eacf..92f1dbe0bbec26 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1,6 +1,6 @@ # Child Process - Stability: 2 - Stable +> Stability: 2 - Stable The `child_process` module provides the ability to spawn child processes in a manner that is similar, but not identical, to popen(3). This capability diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 6f0b424e05e083..71cc3cf8aae150 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -1,6 +1,6 @@ # Cluster - Stability: 2 - Stable +> Stability: 2 - Stable A single instance of Node.js runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node.js @@ -395,7 +395,7 @@ if (cluster.isMaster) { ### worker.suicide - Stability: 0 - Deprecated: Use [`worker.exitedAfterDisconnect`][] instead. +> Stability: 0 - Deprecated: Use [`worker.exitedAfterDisconnect`][] instead. An alias to [`worker.exitedAfterDisconnect`][]. diff --git a/doc/api/console.md b/doc/api/console.md index 9fb8c37a6df66e..45f2f764ccb14c 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -1,6 +1,6 @@ # Console - Stability: 2 - Stable +> Stability: 2 - Stable The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 1c4e825d4e29fb..0951ccf184d0a6 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1,6 +1,6 @@ # Crypto - Stability: 2 - Stable +> Stability: 2 - Stable The `crypto` module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions. @@ -510,7 +510,7 @@ public point (key) is also generated and set in the ECDH object. ### ecdh.setPublicKey(public_key[, encoding]) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated Sets the EC Diffie-Hellman public key. Key encoding can be `'latin1'`, `'hex'` or `'base64'`. If `encoding` is provided `public_key` is expected to @@ -918,7 +918,7 @@ The `key` is the raw key used by the `algorithm` and `iv` is an ### crypto.createCredentials(details) - Stability: 0 - Deprecated: Use [`tls.createSecureContext()`][] instead. +> Stability: 0 - Deprecated: Use [`tls.createSecureContext()`][] instead. The `crypto.createCredentials()` method is a deprecated alias for creating and returning a `tls.SecureContext` object. The `crypto.createCredentials()` diff --git a/doc/api/debugger.md b/doc/api/debugger.md index d146292f2d704e..acffe65cbaac38 100644 --- a/doc/api/debugger.md +++ b/doc/api/debugger.md @@ -1,6 +1,6 @@ # Debugger - Stability: 2 - Stable +> Stability: 2 - Stable diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 1a5cce0b91e150..91d6f749334219 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -1,6 +1,6 @@ # UDP / Datagram Sockets - Stability: 2 - Stable +> Stability: 2 - Stable diff --git a/doc/api/dns.md b/doc/api/dns.md index 7192be9a861999..775d288a54b9e3 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -1,6 +1,6 @@ # DNS - Stability: 2 - Stable +> Stability: 2 - Stable The `dns` module contains functions belonging to two different categories: diff --git a/doc/api/documentation.md b/doc/api/documentation.md index 1acb21a8969fa2..4131badca62947 100644 --- a/doc/api/documentation.md +++ b/doc/api/documentation.md @@ -37,34 +37,26 @@ and in the process of being redesigned. The stability indices are as follows: -```txt -Stability: 0 - Deprecated -This feature is known to be problematic, and changes are -planned. Do not rely on it. Use of the feature may cause warnings. Backwards -compatibility should not be expected. -``` - -```txt -Stability: 1 - Experimental -This feature is subject to change, and is gated by a command line flag. -It may change or be removed in future versions. -``` - -```txt -Stability: 2 - Stable -The API has proven satisfactory. Compatibility with the npm ecosystem -is a high priority, and will not be broken unless absolutely necessary. -``` - -```txt -Stability: 3 - Locked -Only fixes related to security, performance, or bug fixes will be accepted. -Please do not suggest API changes in this area; they will be refused. -``` +> Stability: 0 - Deprecated +> This feature is known to be problematic, and changes are +> planned. Do not rely on it. Use of the feature may cause warnings. Backwards +> compatibility should not be expected. + +> Stability: 1 - Experimental +> This feature is subject to change, and is gated by a command line flag. +> It may change or be removed in future versions. + +> Stability: 2 - Stable +> The API has proven satisfactory. Compatibility with the npm ecosystem +> is a high priority, and will not be broken unless absolutely necessary. + +> Stability: 3 - Locked +> Only fixes related to security, performance, or bug fixes will be accepted. +> Please do not suggest API changes in this area; they will be refused. ## JSON Output - Stability: 1 - Experimental +> Stability: 1 - Experimental Every HTML file in the markdown has a corresponding JSON file with the same data. diff --git a/doc/api/domain.md b/doc/api/domain.md index c556e2533c0be3..204a5571fab7ab 100644 --- a/doc/api/domain.md +++ b/doc/api/domain.md @@ -1,6 +1,6 @@ # Domain - Stability: 0 - Deprecated +> Stability: 0 - Deprecated **This module is pending deprecation**. Once a replacement API has been finalized, this module will be fully deprecated. Most end users should @@ -436,7 +436,7 @@ without exiting the domain. ### domain.dispose() - Stability: 0 - Deprecated. Please recover from failed IO actions +> Stability: 0 - Deprecated. Please recover from failed IO actions explicitly via error event handlers set on the domain. Once `dispose` has been called, the domain will no longer be used by callbacks diff --git a/doc/api/events.md b/doc/api/events.md index 185213cf9edba4..b1297afe0906ce 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1,6 +1,6 @@ # Events - Stability: 2 - Stable +> Stability: 2 - Stable @@ -223,7 +223,7 @@ The `'removeListener'` event is emitted *after* a listener is removed. ### EventEmitter.listenerCount(emitter, eventName) - Stability: 0 - Deprecated: Use [`emitter.listenerCount()`][] instead. +> Stability: 0 - Deprecated: Use [`emitter.listenerCount()`][] instead. A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. diff --git a/doc/api/fs.md b/doc/api/fs.md index 0c84c44b58ee31..1984b5642e305b 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1,6 +1,6 @@ # File System - Stability: 2 - Stable +> Stability: 2 - Stable @@ -584,7 +584,7 @@ added: v0.0.2 deprecated: v1.0.0 --> - Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. +> Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. * `path` {String | Buffer} * `callback` {Function} @@ -610,8 +610,8 @@ added: v0.1.21 deprecated: v1.0.0 --> - Stability: 0 - Deprecated: Use [`fs.statSync()`][] or [`fs.accessSync()`][] - instead. +> Stability: 0 - Deprecated: Use [`fs.statSync()`][] or [`fs.accessSync()`][] +> instead. * `path` {String | Buffer} diff --git a/doc/api/globals.md b/doc/api/globals.md index 7db4fbe1aaae00..63fbf64f6e3d25 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -155,7 +155,7 @@ Error. ### require.extensions - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * {Object} diff --git a/doc/api/http.md b/doc/api/http.md index 606f79f39576de..8bd8da55701b16 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1,6 +1,6 @@ # HTTP - Stability: 2 - Stable +> Stability: 2 - Stable To use the HTTP server and client one must `require('http')`. @@ -1331,7 +1331,7 @@ added: v0.1.13 deprecated: v0.3.6 --> - Stability: 0 - Deprecated: Use [`http.request()`][] instead. +> Stability: 0 - Deprecated: Use [`http.request()`][] instead. Constructs a new HTTP client. `port` and `host` refer to the server to be connected to. diff --git a/doc/api/https.md b/doc/api/https.md index 620b6b36c74906..f2d0624a7461a3 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -1,6 +1,6 @@ # HTTPS - Stability: 2 - Stable +> Stability: 2 - Stable HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module. diff --git a/doc/api/modules.md b/doc/api/modules.md index 9f6093aaece850..ee142d0d7ea9f0 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -1,6 +1,6 @@ # Modules - Stability: 3 - Locked +> Stability: 3 - Locked diff --git a/doc/api/net.md b/doc/api/net.md index e3160ff4616487..18090093ea038d 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -1,6 +1,6 @@ # net - Stability: 2 - Stable +> Stability: 2 - Stable The `net` module provides you with an asynchronous network wrapper. It contains functions for creating both servers and clients (called streams). You can include @@ -98,7 +98,7 @@ added: v0.2.0 deprecated: v0.9.7 --> - Stability: 0 - Deprecated: Use [`server.getConnections()`][] instead. +> Stability: 0 - Deprecated: Use [`server.getConnections()`][] instead. The number of concurrent connections on the server. diff --git a/doc/api/os.md b/doc/api/os.md index 8a9c00971a15a8..98390bb387c313 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -1,6 +1,6 @@ # OS - Stability: 2 - Stable +> Stability: 2 - Stable The `os` module provides a number of operating system-related utility methods. It can be accessed using: diff --git a/doc/api/path.md b/doc/api/path.md index fd07cd6802df9a..4873a60fdaf74e 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -1,6 +1,6 @@ # Path - Stability: 2 - Stable +> Stability: 2 - Stable The `path` module provides utilities for working with file and directory paths. It can be accessed using: diff --git a/doc/api/punycode.md b/doc/api/punycode.md index d34b3fdf2a1fa2..0c2805d56fe2b9 100644 --- a/doc/api/punycode.md +++ b/doc/api/punycode.md @@ -1,6 +1,6 @@ # punycode - Stability: 2 - Stable +> Stability: 2 - Stable The `punycode` module is a bundled version of the [Punycode.js][] module. It can be accessed using: diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 9b87e76f6499a1..1a3732445e27e5 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -1,6 +1,6 @@ # Query String - Stability: 2 - Stable +> Stability: 2 - Stable diff --git a/doc/api/readline.md b/doc/api/readline.md index 9025f6fe7da821..c01397d57108b6 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -1,6 +1,6 @@ # Readline - Stability: 2 - Stable +> Stability: 2 - Stable The `readline` module provides an interface for reading data from a [Readable][] stream (such as [`process.stdin`]) one line at a time. It can be accessed using: diff --git a/doc/api/repl.md b/doc/api/repl.md index 124106e642ee62..3cd2c0677ac476 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -1,6 +1,6 @@ # REPL - Stability: 2 - Stable +> Stability: 2 - Stable The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that is available both as a standalone program or includable in other applications. @@ -444,7 +444,7 @@ added: v2.0.0 deprecated: v3.0.0 --> - Stability: 0 - Deprecated: Use `NODE_REPL_HISTORY` instead. +> Stability: 0 - Deprecated: Use `NODE_REPL_HISTORY` instead. Previously in Node.js/io.js v2.x, REPL history was controlled by using a `NODE_REPL_HISTORY_FILE` environment variable, and the history was saved in JSON diff --git a/doc/api/stream.md b/doc/api/stream.md index 1ccabe6c00b997..2bea7df6cdfbff 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1,6 +1,6 @@ # Stream - Stability: 2 - Stable +> Stability: 2 - Stable A stream is an abstract interface for working with streaming data in Node.js. The `stream` module provides a base API that makes it easy to build objects diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md index 6bd5a57502b82c..b557ffab9725b0 100644 --- a/doc/api/string_decoder.md +++ b/doc/api/string_decoder.md @@ -1,6 +1,6 @@ # StringDecoder - Stability: 2 - Stable +> Stability: 2 - Stable The `string_decoder` module provides an API for decoding `Buffer` objects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 diff --git a/doc/api/timers.md b/doc/api/timers.md index a311edd744ef1a..cd10f4f13565f6 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -1,6 +1,6 @@ # Timers - Stability: 3 - Locked +> Stability: 3 - Locked The `timer` module exposes a global API for scheduling functions to be called at some future period of time. Because the timer functions are diff --git a/doc/api/tls.md b/doc/api/tls.md index 94dc78fbe77a10..fa47d75be1b7b7 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1,6 +1,6 @@ # TLS (SSL) - Stability: 2 - Stable +> Stability: 2 - Stable The `tls` module provides an implementation of the Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. @@ -1153,7 +1153,7 @@ added: v0.3.4 deprecated: v0.11.3 --> - Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. +> Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. The `tls.CryptoStream` class represents a stream of encrypted data. This class has been deprecated and should no longer be used. @@ -1174,7 +1174,7 @@ added: v0.3.2 deprecated: v0.11.3 --> - Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. +> Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. Returned by [`tls.createSecurePair()`][]. @@ -1197,7 +1197,7 @@ added: v0.3.2 deprecated: v0.11.3 --> - Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. +> Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. * `context` {Object} A secure context object as returned by `tls.createSecureContext()` diff --git a/doc/api/tty.md b/doc/api/tty.md index 372f29b6ce058d..f9be1fc4ffd3e5 100644 --- a/doc/api/tty.md +++ b/doc/api/tty.md @@ -1,6 +1,6 @@ # TTY - Stability: 2 - Stable +> Stability: 2 - Stable The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module directly. diff --git a/doc/api/url.md b/doc/api/url.md index 76b0a3794d5bf6..023697803dd0e3 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -1,6 +1,6 @@ # URL - Stability: 2 - Stable +> Stability: 2 - Stable The `url` module provides utilities for URL resolution and parsing. It can be accessed using: diff --git a/doc/api/util.md b/doc/api/util.md index 34c68393332a5d..77fbbd5994c2c2 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1,6 +1,6 @@ # util - Stability: 2 - Stable +> Stability: 2 - Stable The `util` module is primarily designed to support the needs of Node.js' own internal APIs. However, many of the utilities are useful for application and @@ -278,7 +278,7 @@ applications and modules should be updated to find alternative approaches. ### util.debug(string) - Stability: 0 - Deprecated: Use [`console.error()`][] instead. +> Stability: 0 - Deprecated: Use [`console.error()`][] instead. * `string` {string} The message to print to `stderr` @@ -286,7 +286,7 @@ Deprecated predecessor of `console.error`. ### util.error([...]) - Stability: 0 - Deprecated: Use [`console.error()`][] instead. +> Stability: 0 - Deprecated: Use [`console.error()`][] instead. * `string` {string} The message to print to `stderr` @@ -294,7 +294,7 @@ Deprecated predecessor of `console.error`. ### util.isArray(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -315,7 +315,7 @@ util.isArray({}); ### util.isBoolean(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -334,7 +334,7 @@ util.isBoolean(false); ### util.isBuffer(object) - Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead. +> Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead. * `object` {any} @@ -353,7 +353,7 @@ util.isBuffer(Buffer.from('hello world')); ### util.isDate(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -372,7 +372,7 @@ util.isDate({}); ### util.isError(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -407,7 +407,7 @@ util.isError(obj); ### util.isFunction(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -430,7 +430,7 @@ util.isFunction(Bar); ### util.isNull(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -450,7 +450,7 @@ util.isNull(null); ### util.isNullOrUndefined(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -470,7 +470,7 @@ util.isNullOrUndefined(null); ### util.isNumber(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -491,7 +491,7 @@ util.isNumber(NaN); ### util.isObject(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -513,7 +513,7 @@ util.isObject(function(){}); ### util.isPrimitive(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -545,7 +545,7 @@ util.isPrimitive(new Date()); ### util.isRegExp(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -564,7 +564,7 @@ util.isRegExp({}); ### util.isString(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -585,7 +585,7 @@ util.isString(5); ### util.isSymbol(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -604,7 +604,7 @@ util.isSymbol(Symbol('foo')); ### util.isUndefined(object) - Stability: 0 - Deprecated +> Stability: 0 - Deprecated * `object` {any} @@ -624,7 +624,7 @@ util.isUndefined(null); ### util.log(string) - Stability: 0 - Deprecated: Use a third party module instead. +> Stability: 0 - Deprecated: Use a third party module instead. * `string` {string} @@ -639,19 +639,19 @@ util.log('Timestamped message.'); ### util.print([...]) - Stability: 0 - Deprecated: Use [`console.log()`][] instead. +> Stability: 0 - Deprecated: Use [`console.log()`][] instead. Deprecated predecessor of `console.log`. ### util.puts([...]) - Stability: 0 - Deprecated: Use [`console.log()`][] instead. +> Stability: 0 - Deprecated: Use [`console.log()`][] instead. Deprecated predecessor of `console.log`. ### util._extend(obj) - Stability: 0 - Deprecated: Use [`Object.assign()`] instead. +> Stability: 0 - Deprecated: Use [`Object.assign()`] instead. The `util._extend()` method was never intended to be used outside of internal Node.js modules. The community found and used it anyway. diff --git a/doc/api/vm.md b/doc/api/vm.md index c774ebe6a44bd7..d57b64d0e16432 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -1,6 +1,6 @@ # Executing JavaScript - Stability: 2 - Stable +> Stability: 2 - Stable diff --git a/doc/api/zlib.md b/doc/api/zlib.md index e421841d67a467..b8efe1486245a9 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -1,6 +1,6 @@ # Zlib - Stability: 2 - Stable +> Stability: 2 - Stable The `zlib` module provides compression functionality implemented using Gzip and Deflate/Inflate. It can be accessed using: diff --git a/tools/doc/README.md b/tools/doc/README.md index 1620d6c25acbc9..e472c712dc0a52 100644 --- a/tools/doc/README.md +++ b/tools/doc/README.md @@ -10,7 +10,7 @@ Each type of heading has a description block. added: v0.10.0 --> - Stability: 3 - Stable + > Stability: 3 - Stable description and examples. diff --git a/tools/doc/html.js b/tools/doc/html.js index 769d601e26c800..df0e7ebda6f2e4 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -150,11 +150,20 @@ function parseText(lexed) { // lists that come right after a heading are what we're after. function parseLists(input) { var state = null; + var savedState = []; var depth = 0; var output = []; output.links = input.links; input.forEach(function(tok) { - if (tok.type === 'code' && tok.text.match(/Stability:.*/g)) { + if (tok.type === 'blockquote_start') { + savedState.push(state); + state = 'BLOCKQUOTE'; + } + if (tok.type === 'blockquote_end') { + state = savedState.pop(); + } + if (tok.type === 'paragraph' && state === 'BLOCKQUOTE' && + tok.text.match(/Stability:.*/g)) { tok.text = parseAPIHeader(tok.text); output.push({ type: 'html', text: tok.text }); return; diff --git a/tools/doc/json.js b/tools/doc/json.js index 33bde6515b1235..29a39c826ebe3c 100644 --- a/tools/doc/json.js +++ b/tools/doc/json.js @@ -91,10 +91,8 @@ function doJSON(input, filename, cb) { // here and the next heading should be parsed as the desc. var stability; if (state === 'AFTERHEADING') { - if (type === 'code' && - (stability = text.match(/^Stability: ([0-5])(?:\s*-\s*)?(.*)$/))) { - current.stability = parseInt(stability[1], 10); - current.stabilityText = stability[2].trim(); + if (type === 'blockquote_start') { + state = 'AFTERHEADING_BLOCKQUOTE'; return; } else if (type === 'list_start' && !tok.ordered) { state = 'AFTERHEADING_LIST'; @@ -129,6 +127,20 @@ function doJSON(input, filename, cb) { return; } + if (state === 'AFTERHEADING_BLOCKQUOTE') { + if (type === 'blockquote_end') { + state = 'AFTERHEADING'; + return; + } + + if (type === 'paragraph' && + (stability = text.match(/^Stability: ([0-5])(?:\s*-\s*)?(.*)$/))) { + current.stability = parseInt(stability[1], 10); + current.stabilityText = stability[2].trim(); + return; + } + } + current.desc = current.desc || []; current.desc.push(tok);