Browse Source

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).

PR-URL: https://github.com/nodejs/node/pull/7757
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
v4.x
Anna Henningsen 9 years ago
committed by Myles Borins
parent
commit
2a2971b26e
  1. 2
      doc/api/assert.md
  2. 2
      doc/api/buffer.md
  3. 2
      doc/api/child_process.md
  4. 2
      doc/api/cluster.md
  5. 2
      doc/api/console.md
  6. 6
      doc/api/crypto.md
  7. 2
      doc/api/debugger.md
  8. 2
      doc/api/dgram.md
  9. 2
      doc/api/dns.md
  10. 2
      doc/api/documentation.md
  11. 6
      doc/api/domain.md
  12. 4
      doc/api/events.md
  13. 7
      doc/api/fs.md
  14. 2
      doc/api/globals.md
  15. 4
      doc/api/http.md
  16. 2
      doc/api/https.md
  17. 2
      doc/api/modules.md
  18. 4
      doc/api/net.md
  19. 2
      doc/api/os.md
  20. 2
      doc/api/path.md
  21. 2
      doc/api/punycode.md
  22. 2
      doc/api/querystring.md
  23. 2
      doc/api/readline.md
  24. 4
      doc/api/repl.md
  25. 2
      doc/api/stream.md
  26. 2
      doc/api/string_decoder.md
  27. 2
      doc/api/timers.md
  28. 4
      doc/api/tls.md
  29. 4
      doc/api/tty.md
  30. 2
      doc/api/url.md
  31. 42
      doc/api/util.md
  32. 2
      doc/api/v8.md
  33. 2
      doc/api/vm.md
  34. 2
      doc/api/zlib.md
  35. 2
      tools/doc/README.md
  36. 22
      tools/doc/html.js
  37. 26
      tools/doc/json.js

2
doc/api/assert.md

@ -1,6 +1,6 @@
# Assert # Assert
Stability: 3 - Locked > Stability: 3 - Locked
The `assert` module provides a simple set of assertion tests that can be used to 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 test invariants. The module is intended for internal use by Node.js, but can be

2
doc/api/buffer.md

@ -1,6 +1,6 @@
# Buffer # Buffer
Stability: 2 - Stable > Stability: 2 - Stable
Prior to the introduction of `TypedArray` in ECMAScript 2015 (ES6), the Prior to the introduction of `TypedArray` in ECMAScript 2015 (ES6), the
JavaScript language had no mechanism for reading or manipulating streams JavaScript language had no mechanism for reading or manipulating streams

2
doc/api/child_process.md

@ -1,6 +1,6 @@
# Child Process # Child Process
Stability: 2 - Stable > Stability: 2 - Stable
The `child_process` module provides the ability to spawn child processes in 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 a manner that is similar, but not identical, to [`popen(3)`][]. This capability

2
doc/api/cluster.md

@ -1,6 +1,6 @@
# Cluster # Cluster
Stability: 2 - Stable > Stability: 2 - Stable
A single instance of Node.js runs in a single thread. To take advantage of 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 multi-core systems the user will sometimes want to launch a cluster of Node.js

2
doc/api/console.md

@ -1,6 +1,6 @@
# Console # Console
Stability: 2 - Stable > Stability: 2 - Stable
The `console` module provides a simple debugging console that is similar to the The `console` module provides a simple debugging console that is similar to the
JavaScript console mechanism provided by web browsers. JavaScript console mechanism provided by web browsers.

6
doc/api/crypto.md

@ -1,6 +1,6 @@
# Crypto # Crypto
Stability: 2 - Stable > Stability: 2 - Stable
The `crypto` module provides cryptographic functionality that includes a set of The `crypto` module provides cryptographic functionality that includes a set of
wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions. wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions.
@ -495,7 +495,7 @@ public point (key) is also generated and set in the ECDH object.
### ecdh.setPublicKey(public_key[, encoding]) ### ecdh.setPublicKey(public_key[, encoding])
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Sets the EC Diffie-Hellman public key. Key encoding can be `'binary'`, Sets the EC Diffie-Hellman public key. Key encoding can be `'binary'`,
`'hex'` or `'base64'`. If `encoding` is provided `public_key` is expected to `'hex'` or `'base64'`. If `encoding` is provided `public_key` is expected to
@ -892,7 +892,7 @@ The `key` is the raw key used by the `algorithm` and `iv` is an
### crypto.createCredentials(details) ### 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 The `crypto.createCredentials()` method is a deprecated alias for creating
and returning a `tls.SecureContext` object. The `crypto.createCredentials()` and returning a `tls.SecureContext` object. The `crypto.createCredentials()`

2
doc/api/debugger.md

@ -1,6 +1,6 @@
# Debugger # Debugger
Stability: 2 - Stable > Stability: 2 - Stable
<!-- type=misc --> <!-- type=misc -->

2
doc/api/dgram.md

@ -1,6 +1,6 @@
# UDP / Datagram Sockets # UDP / Datagram Sockets
Stability: 2 - Stable > Stability: 2 - Stable
<!-- name=dgram --> <!-- name=dgram -->

2
doc/api/dns.md

@ -1,6 +1,6 @@
# DNS # DNS
Stability: 2 - Stable > Stability: 2 - Stable
The `dns` module contains functions belonging to two different categories: The `dns` module contains functions belonging to two different categories:

2
doc/api/documentation.md

@ -64,7 +64,7 @@ Please do not suggest API changes in this area; they will be refused.
## JSON Output ## JSON Output
Stability: 1 - Experimental > Stability: 1 - Experimental
Every HTML file in the markdown has a corresponding JSON file with the Every HTML file in the markdown has a corresponding JSON file with the
same data. same data.

6
doc/api/domain.md

@ -1,6 +1,6 @@
# Domain # Domain
Stability: 0 - Deprecated > Stability: 0 - Deprecated
**This module is pending deprecation**. Once a replacement API has been **This module is pending deprecation**. Once a replacement API has been
finalized, this module will be fully deprecated. Most end users should finalized, this module will be fully deprecated. Most end users should
@ -436,8 +436,8 @@ without exiting the domain.
### domain.dispose() ### 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. > explicitly via error event handlers set on the domain.
Once `dispose` has been called, the domain will no longer be used by callbacks Once `dispose` has been called, the domain will no longer be used by callbacks
bound into the domain via `run`, `bind`, or `intercept`, and a `'dispose'` event bound into the domain via `run`, `bind`, or `intercept`, and a `'dispose'` event

4
doc/api/events.md

@ -1,6 +1,6 @@
# Events # Events
Stability: 2 - Stable > Stability: 2 - Stable
<!--type=module--> <!--type=module-->
@ -244,7 +244,7 @@ The `'removeListener'` event is emitted *after* a listener is removed.
### EventEmitter.listenerCount(emitter, eventName) ### 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` A class method that returns the number of listeners for the given `eventName`
registered on the given `emitter`. registered on the given `emitter`.

7
doc/api/fs.md

@ -1,6 +1,6 @@
# File System # File System
Stability: 2 - Stable > Stability: 2 - Stable
<!--name=fs--> <!--name=fs-->
@ -476,7 +476,7 @@ added: v0.0.2
deprecated: v1.0.0 deprecated: v1.0.0
--> -->
Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. > Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead.
Test whether or not the given path exists by checking with the file system. Test whether or not the given path exists by checking with the file system.
Then call the `callback` argument with either true or false. Example: Then call the `callback` argument with either true or false. Example:
@ -499,7 +499,8 @@ added: v0.1.21
deprecated: v1.0.0 deprecated: v1.0.0
--> -->
Stability: 0 - Deprecated: Use [`fs.statSync()`][] or [`fs.accessSync()`][] instead. > Stability: 0 - Deprecated: Use [`fs.statSync()`][] or [`fs.accessSync()`][]
> instead.
Synchronous version of [`fs.exists()`][]. Synchronous version of [`fs.exists()`][].
Returns `true` if the file exists, `false` otherwise. Returns `true` if the file exists, `false` otherwise.

2
doc/api/globals.md

@ -155,7 +155,7 @@ Error.
### require.extensions ### require.extensions
Stability: 0 - Deprecated > Stability: 0 - Deprecated
* {Object} * {Object}

4
doc/api/http.md

@ -1,6 +1,6 @@
# HTTP # HTTP
Stability: 2 - Stable > Stability: 2 - Stable
To use the HTTP server and client one must `require('http')`. To use the HTTP server and client one must `require('http')`.
@ -1274,7 +1274,7 @@ added: v0.1.13
deprecated: v0.3.6 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 Constructs a new HTTP client. `port` and `host` refer to the server to be
connected to. connected to.

2
doc/api/https.md

@ -1,6 +1,6 @@
# HTTPS # HTTPS
Stability: 2 - Stable > Stability: 2 - Stable
HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
separate module. separate module.

2
doc/api/modules.md

@ -1,6 +1,6 @@
# Modules # Modules
Stability: 3 - Locked > Stability: 3 - Locked
<!--name=module--> <!--name=module-->

4
doc/api/net.md

@ -1,6 +1,6 @@
# net # net
Stability: 2 - Stable > Stability: 2 - Stable
The `net` module provides you with an asynchronous network wrapper. It contains The `net` module provides you with an asynchronous network wrapper. It contains
functions for creating both servers and clients (called streams). You can include functions for creating both servers and clients (called streams). You can include
@ -97,7 +97,7 @@ added: v0.2.0
deprecated: v0.9.7 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. The number of concurrent connections on the server.

2
doc/api/os.md

@ -1,6 +1,6 @@
# OS # OS
Stability: 2 - Stable > Stability: 2 - Stable
Provides a few basic operating-system related utility functions. Provides a few basic operating-system related utility functions.

2
doc/api/path.md

@ -1,6 +1,6 @@
# Path # Path
Stability: 2 - Stable > Stability: 2 - Stable
This module contains utilities for handling and transforming file This module contains utilities for handling and transforming file
paths. Almost all these methods perform only string transformations. paths. Almost all these methods perform only string transformations.

2
doc/api/punycode.md

@ -1,6 +1,6 @@
# punycode # punycode
Stability: 2 - Stable > Stability: 2 - Stable
[Punycode.js][] is bundled with Node.js v0.5.1+. Use `require('punycode')` to [Punycode.js][] is bundled with Node.js v0.5.1+. Use `require('punycode')` to
access it. (To use it with other Node.js versions, use npm to install the access it. (To use it with other Node.js versions, use npm to install the

2
doc/api/querystring.md

@ -1,6 +1,6 @@
# Query String # Query String
Stability: 2 - Stable > Stability: 2 - Stable
<!--name=querystring--> <!--name=querystring-->

2
doc/api/readline.md

@ -1,6 +1,6 @@
# Readline # Readline
Stability: 2 - Stable > Stability: 2 - Stable
To use this module, do `require('readline')`. Readline allows reading of a To use this module, do `require('readline')`. Readline allows reading of a
stream (such as [`process.stdin`][]) on a line-by-line basis. stream (such as [`process.stdin`][]) on a line-by-line basis.

4
doc/api/repl.md

@ -1,6 +1,6 @@
# REPL # REPL
Stability: 2 - Stable > Stability: 2 - Stable
A Read-Eval-Print-Loop (REPL) is available both as a standalone program and A Read-Eval-Print-Loop (REPL) is available both as a standalone program and
easily includable in other programs. The REPL provides a way to interactively easily includable in other programs. The REPL provides a way to interactively
@ -56,7 +56,7 @@ disabled by setting the environment variable `NODE_REPL_HISTORY=""`.
### NODE_REPL_HISTORY_FILE ### NODE_REPL_HISTORY_FILE
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 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 `NODE_REPL_HISTORY_FILE` environment variable, and the history was saved in JSON

2
doc/api/stream.md

@ -1,6 +1,6 @@
# Stream # Stream
Stability: 2 - Stable > Stability: 2 - Stable
A stream is an abstract interface implemented by various objects in A stream is an abstract interface implemented by various objects in
Node.js. For example a [request to an HTTP server][http-incoming-message] is a Node.js. For example a [request to an HTTP server][http-incoming-message] is a

2
doc/api/string_decoder.md

@ -1,6 +1,6 @@
# StringDecoder # StringDecoder
Stability: 2 - Stable > Stability: 2 - Stable
To use this module, do `require('string_decoder')`. StringDecoder decodes a To use this module, do `require('string_decoder')`. StringDecoder decodes a
buffer to a string. It is a simple interface to `buffer.toString()` but provides buffer to a string. It is a simple interface to `buffer.toString()` but provides

2
doc/api/timers.md

@ -1,6 +1,6 @@
# Timers # Timers
Stability: 3 - Locked > Stability: 3 - Locked
All of the timer functions are globals. You do not need to `require()` All of the timer functions are globals. You do not need to `require()`
this module in order to use them. this module in order to use them.

4
doc/api/tls.md

@ -1,6 +1,6 @@
# TLS (SSL) # TLS (SSL)
Stability: 2 - Stable > Stability: 2 - Stable
Use `require('tls')` to access this module. Use `require('tls')` to access this module.
@ -159,7 +159,7 @@ is expensive.
## Class: CryptoStream ## Class: CryptoStream
Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead. > Stability: 0 - Deprecated: Use [`tls.TLSSocket`][] instead.
This is an encrypted stream. This is an encrypted stream.

4
doc/api/tty.md

@ -1,6 +1,6 @@
# TTY # TTY
Stability: 2 - Stable > Stability: 2 - Stable
The `tty` module houses the `tty.ReadStream` and `tty.WriteStream` classes. In The `tty` module houses the `tty.ReadStream` and `tty.WriteStream` classes. In
most cases, you will not need to use this module directly. most cases, you will not need to use this module directly.
@ -95,6 +95,6 @@ terminal.
## tty.setRawMode(mode) ## tty.setRawMode(mode)
Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead. > Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.
[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode [tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode

2
doc/api/url.md

@ -1,6 +1,6 @@
# URL # URL
Stability: 2 - Stable > Stability: 2 - Stable
This module has utilities for URL resolution and parsing. This module has utilities for URL resolution and parsing.
Call `require('url')` to use it. Call `require('url')` to use it.

42
doc/api/util.md

@ -1,6 +1,6 @@
# util # util
Stability: 2 - Stable > Stability: 2 - Stable
These functions are in the module `'util'`. Use `require('util')` to These functions are in the module `'util'`. Use `require('util')` to
access them. access them.
@ -14,7 +14,7 @@ are unnecessary for Node.js's internal functionality.
## util.debug(string) ## util.debug(string)
Stability: 0 - Deprecated: Use [`console.error()`][] instead. > Stability: 0 - Deprecated: Use [`console.error()`][] instead.
Deprecated predecessor of `console.error`. Deprecated predecessor of `console.error`.
@ -83,7 +83,7 @@ when the deprecated API is used. Configurable at run-time through the
## util.error([...]) ## util.error([...])
Stability: 0 - Deprecated: Use [`console.error()`][] instead. > Stability: 0 - Deprecated: Use [`console.error()`][] instead.
Deprecated predecessor of `console.error`. Deprecated predecessor of `console.error`.
@ -250,7 +250,7 @@ util.inspect(obj);
## util.isArray(object) ## util.isArray(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Internal alias for [`Array.isArray`][]. Internal alias for [`Array.isArray`][].
@ -269,7 +269,7 @@ util.isArray({})
## util.isBoolean(object) ## util.isBoolean(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `Boolean`. Otherwise, returns `false`. Returns `true` if the given "object" is a `Boolean`. Otherwise, returns `false`.
@ -286,7 +286,7 @@ util.isBoolean(false)
## util.isBuffer(object) ## util.isBuffer(object)
Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead. > Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead.
Returns `true` if the given "object" is a `Buffer`. Otherwise, returns `false`. Returns `true` if the given "object" is a `Buffer`. Otherwise, returns `false`.
@ -303,7 +303,7 @@ util.isBuffer(new Buffer('hello world'))
## util.isDate(object) ## util.isDate(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `Date`. Otherwise, returns `false`. Returns `true` if the given "object" is a `Date`. Otherwise, returns `false`.
@ -320,7 +320,7 @@ util.isDate({})
## util.isError(object) ## util.isError(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is an [`Error`][]. Otherwise, returns Returns `true` if the given "object" is an [`Error`][]. Otherwise, returns
`false`. `false`.
@ -338,7 +338,7 @@ util.isError({ name: 'Error', message: 'an error occurred' })
## util.isFunction(object) ## util.isFunction(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `Function`. Otherwise, returns Returns `true` if the given "object" is a `Function`. Otherwise, returns
`false`. `false`.
@ -359,7 +359,7 @@ util.isFunction(Bar)
## util.isNull(object) ## util.isNull(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is strictly `null`. Otherwise, returns Returns `true` if the given "object" is strictly `null`. Otherwise, returns
`false`. `false`.
@ -377,7 +377,7 @@ util.isNull(null)
## util.isNullOrUndefined(object) ## util.isNullOrUndefined(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is `null` or `undefined`. Otherwise, Returns `true` if the given "object" is `null` or `undefined`. Otherwise,
returns `false`. returns `false`.
@ -395,7 +395,7 @@ util.isNullOrUndefined(null)
## util.isNumber(object) ## util.isNumber(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `Number`. Otherwise, returns `false`. Returns `true` if the given "object" is a `Number`. Otherwise, returns `false`.
@ -414,7 +414,7 @@ util.isNumber(NaN)
## util.isObject(object) ## util.isObject(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is strictly an `Object` __and__ not a Returns `true` if the given "object" is strictly an `Object` __and__ not a
`Function`. Otherwise, returns `false`. `Function`. Otherwise, returns `false`.
@ -434,7 +434,7 @@ util.isObject(function(){})
## util.isPrimitive(object) ## util.isPrimitive(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a primitive type. Otherwise, returns Returns `true` if the given "object" is a primitive type. Otherwise, returns
`false`. `false`.
@ -464,7 +464,7 @@ util.isPrimitive(new Date())
## util.isRegExp(object) ## util.isRegExp(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `RegExp`. Otherwise, returns `false`. Returns `true` if the given "object" is a `RegExp`. Otherwise, returns `false`.
@ -481,7 +481,7 @@ util.isRegExp({})
## util.isString(object) ## util.isString(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `String`. Otherwise, returns `false`. Returns `true` if the given "object" is a `String`. Otherwise, returns `false`.
@ -500,7 +500,7 @@ util.isString(5)
### util.isSymbol(object) ### util.isSymbol(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is a `Symbol`. Otherwise, returns `false`. Returns `true` if the given "object" is a `Symbol`. Otherwise, returns `false`.
@ -517,7 +517,7 @@ util.isSymbol(Symbol('foo'))
## util.isUndefined(object) ## util.isUndefined(object)
Stability: 0 - Deprecated > Stability: 0 - Deprecated
Returns `true` if the given "object" is `undefined`. Otherwise, returns `false`. Returns `true` if the given "object" is `undefined`. Otherwise, returns `false`.
@ -541,19 +541,19 @@ Output with timestamp on `stdout`.
## util.print([...]) ## util.print([...])
Stability: 0 - Deprecated: Use [`console.log()`][] instead. > Stability: 0 - Deprecated: Use [`console.log()`][] instead.
Deprecated predecessor of `console.log`. Deprecated predecessor of `console.log`.
## util.pump(readableStream, writableStream[, callback]) ## util.pump(readableStream, writableStream[, callback])
Stability: 0 - Deprecated: Use readableStream.pipe(writableStream) > Stability: 0 - Deprecated: Use readableStream.pipe(writableStream)
Deprecated predecessor of `stream.pipe()`. Deprecated predecessor of `stream.pipe()`.
## util.puts([...]) ## util.puts([...])
Stability: 0 - Deprecated: Use [`console.log()`][] instead. > Stability: 0 - Deprecated: Use [`console.log()`][] instead.
Deprecated predecessor of `console.log`. Deprecated predecessor of `console.log`.

2
doc/api/v8.md

@ -1,6 +1,6 @@
# V8 # V8
Stability: 2 - Stable > Stability: 2 - Stable
This module exposes events and interfaces specific to the version of [V8][] This module exposes events and interfaces specific to the version of [V8][]
built with Node.js. These interfaces are subject to change by upstream and are built with Node.js. These interfaces are subject to change by upstream and are

2
doc/api/vm.md

@ -1,6 +1,6 @@
# Executing JavaScript # Executing JavaScript
Stability: 2 - Stable > Stability: 2 - Stable
<!--name=vm--> <!--name=vm-->

2
doc/api/zlib.md

@ -1,6 +1,6 @@
# Zlib # Zlib
Stability: 2 - Stable > Stability: 2 - Stable
You can access this module with: You can access this module with:

2
tools/doc/README.md

@ -10,7 +10,7 @@ Each type of heading has a description block.
added: v0.10.0 added: v0.10.0
--> -->
Stability: 3 - Stable > Stability: 3 - Stable
description and examples. description and examples.

22
tools/doc/html.js

@ -150,15 +150,31 @@ function parseText(lexed) {
// lists that come right after a heading are what we're after. // lists that come right after a heading are what we're after.
function parseLists(input) { function parseLists(input) {
var state = null; var state = null;
var savedState = [];
var depth = 0; var depth = 0;
var output = []; var output = [];
output.links = input.links; output.links = input.links;
input.forEach(function(tok) { input.forEach(function(tok) {
if (tok.type === 'code' && tok.text.match(/Stability:.*/g)) { if (tok.type === 'blockquote_start') {
tok.text = parseAPIHeader(tok.text); savedState.push(state);
output.push({ type: 'html', text: tok.text }); state = 'MAYBE_STABILITY_BQ';
return; return;
} }
if (tok.type === 'blockquote_end' && state === 'MAYBE_STABILITY_BQ') {
state = savedState.pop();
return;
}
if ((tok.type === 'paragraph' && state === 'MAYBE_STABILITY_BQ') ||
tok.type === 'code') {
if (tok.text.match(/Stability:.*/g)) {
tok.text = parseAPIHeader(tok.text);
output.push({ type: 'html', text: tok.text });
return;
} else if (state === 'MAYBE_STABILITY_BQ') {
output.push({ type: 'blockquote_start' });
state = savedState.pop();
}
}
if (state === null || if (state === null ||
(state === 'AFTERHEADING' && tok.type === 'heading')) { (state === 'AFTERHEADING' && tok.type === 'heading')) {
if (tok.type === 'heading') { if (tok.type === 'heading') {

26
tools/doc/json.js

@ -82,19 +82,19 @@ function doJSON(input, filename, cb) {
// Immediately after a heading, we can expect the following // Immediately after a heading, we can expect the following
// //
// { type: 'code', text: 'Stability: ...' }, // { type: 'blockquote_start' }
// { type: 'paragraph', text: 'Stability: ...' },
// { type: 'blockquote_end' }
// //
// a list: starting with list_start, ending with list_end, // a list: starting with list_start, ending with list_end,
// maybe containing other nested lists in each item. // maybe containing other nested lists in each item.
// //
// If one of these isnt' found, then anything that comes between // If one of these isn't found, then anything that comes between
// here and the next heading should be parsed as the desc. // here and the next heading should be parsed as the desc.
var stability; var stability;
if (state === 'AFTERHEADING') { if (state === 'AFTERHEADING') {
if (type === 'code' && if (type === 'blockquote_start') {
(stability = text.match(/^Stability: ([0-5])(?:\s*-\s*)?(.*)$/))) { state = 'AFTERHEADING_BLOCKQUOTE';
current.stability = parseInt(stability[1], 10);
current.stabilityText = stability[2].trim();
return; return;
} else if (type === 'list_start' && !tok.ordered) { } else if (type === 'list_start' && !tok.ordered) {
state = 'AFTERHEADING_LIST'; state = 'AFTERHEADING_LIST';
@ -129,6 +129,20 @@ function doJSON(input, filename, cb) {
return; 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 = current.desc || [];
current.desc.push(tok); current.desc.push(tok);

Loading…
Cancel
Save