diff options
author | Rich Trott <rtrott@gmail.com> | 2019-12-25 01:56:39 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2020-01-03 18:21:56 +0300 |
commit | 128a69dde3db47b5b8ae44c64630c1c7815f74a1 (patch) | |
tree | c37fdb6cb265d8e867db2ae19c4fb3fa14aba5e8 | |
parent | 125a59a0b03090011105867b96e5cb5071fdc94f (diff) |
doc,readline: use code markup/markdown in headers
PR-URL: https://github.com/nodejs/node/pull/31086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-rw-r--r-- | doc/api/readline.md | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md index b98f7055045..cbb844886d6 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -34,7 +34,7 @@ Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be received on the `input` stream. -## Class: Interface +## Class: `Interface` <!-- YAML added: v0.1.104 --> @@ -47,7 +47,7 @@ single `input` [Readable][] stream and a single `output` [Writable][] stream. The `output` stream is used to print prompts for user input that arrives on, and is read from, the `input` stream. -### Event: 'close' +### Event: `'close'` <!-- YAML added: v0.1.98 --> @@ -66,7 +66,7 @@ The listener function is called without passing any arguments. The `readline.Interface` instance is finished once the `'close'` event is emitted. -### Event: 'line' +### Event: `'line'` <!-- YAML added: v0.1.98 --> @@ -84,7 +84,7 @@ rl.on('line', (input) => { }); ``` -### Event: 'pause' +### Event: `'pause'` <!-- YAML added: v0.7.5 --> @@ -103,7 +103,7 @@ rl.on('pause', () => { }); ``` -### Event: 'resume' +### Event: `'resume'` <!-- YAML added: v0.7.5 --> @@ -118,7 +118,7 @@ rl.on('resume', () => { }); ``` -### Event: 'SIGCONT' +### Event: `'SIGCONT'` <!-- YAML added: v0.7.5 --> @@ -141,7 +141,7 @@ rl.on('SIGCONT', () => { The `'SIGCONT'` event is _not_ supported on Windows. -### Event: 'SIGINT' +### Event: `'SIGINT'` <!-- YAML added: v0.3.0 --> @@ -161,7 +161,7 @@ rl.on('SIGINT', () => { }); ``` -### Event: 'SIGTSTP' +### Event: `'SIGTSTP'` <!-- YAML added: v0.7.5 --> @@ -189,7 +189,7 @@ rl.on('SIGTSTP', () => { The `'SIGTSTP'` event is _not_ supported on Windows. -### rl.close() +### `rl.close()` <!-- YAML added: v0.1.98 --> @@ -201,7 +201,7 @@ the `'close'` event will be emitted. Calling `rl.close()` does not immediately stop other events (including `'line'`) from being emitted by the `readline.Interface` instance. -### rl.pause() +### `rl.pause()` <!-- YAML added: v0.3.4 --> @@ -212,7 +212,7 @@ later if necessary. Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `readline.Interface` instance. -### rl.prompt(\[preserveCursor\]) +### `rl.prompt([preserveCursor])` <!-- YAML added: v0.1.98 --> @@ -230,7 +230,7 @@ paused. If the `readline.Interface` was created with `output` set to `null` or `undefined` the prompt is not written. -### rl.question(query, callback) +### `rl.question(query, callback)` <!-- YAML added: v0.3.3 --> @@ -262,14 +262,14 @@ The `callback` function passed to `rl.question()` does not follow the typical pattern of accepting an `Error` object or `null` as the first argument. The `callback` is called with the provided answer as the only argument. -### rl.resume() +### `rl.resume()` <!-- YAML added: v0.3.4 --> The `rl.resume()` method resumes the `input` stream if it has been paused. -### rl.setPrompt(prompt) +### `rl.setPrompt(prompt)` <!-- YAML added: v0.1.98 --> @@ -279,7 +279,7 @@ added: v0.1.98 The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. -### rl.write(data\[, key\]) +### `rl.write(data[, key])` <!-- YAML added: v0.1.98 --> @@ -312,7 +312,7 @@ rl.write(null, { ctrl: true, name: 'u' }); The `rl.write()` method will write the data to the `readline` `Interface`'s `input` *as if it were provided by the user*. -### rl\[Symbol.asyncIterator\]() +### `rl[Symbol.asyncIterator]()` <!-- YAML added: v11.4.0 changes: @@ -349,7 +349,7 @@ async function processLineByLine() { } ``` -### rl.line +### `rl.line` <!-- YAML added: 0.1.98 --> @@ -384,7 +384,7 @@ process.stdin.on('keypress', (c, k) => { }); ``` -### rl.cursor +### `rl.cursor` <!-- YAML added: 0.1.98 --> @@ -398,7 +398,7 @@ reading input from a TTY stream. The position of cursor determines the portion of the input string that will be modified as input is processed, as well as the column where the terminal caret will be rendered. -### rl.getCursorPos() +### `rl.getCursorPos()` <!-- YAML added: v13.5.0 --> @@ -411,7 +411,7 @@ Returns the real position of the cursor in relation to the input prompt + string. Long input (wrapping) strings, as well as multiple line prompts are included in the calculations. -## readline.clearLine(stream, dir\[, callback\]) +## `readline.clearLine(stream, dir[, callback])` <!-- YAML added: v0.7.7 changes: @@ -433,7 +433,7 @@ changes: The `readline.clearLine()` method clears current line of given [TTY][] stream in a specified direction identified by `dir`. -## readline.clearScreenDown(stream\[, callback\]) +## `readline.clearScreenDown(stream[, callback])` <!-- YAML added: v0.7.7 changes: @@ -451,7 +451,7 @@ changes: The `readline.clearScreenDown()` method clears the given [TTY][] stream from the current position of the cursor down. -## readline.createInterface(options) +## `readline.createInterface(options)` <!-- YAML added: v0.1.98 changes: @@ -552,7 +552,7 @@ function completer(linePartial, callback) { } ``` -## readline.cursorTo(stream, x\[, y\]\[, callback\]) +## `readline.cursorTo(stream, x[, y][, callback])` <!-- YAML added: v0.7.7 changes: @@ -572,7 +572,7 @@ changes: The `readline.cursorTo()` method moves cursor to the specified position in a given [TTY][] `stream`. -## readline.emitKeypressEvents(stream\[, interface\]) +## `readline.emitKeypressEvents(stream[, interface])` <!-- YAML added: v0.7.7 --> @@ -598,7 +598,7 @@ if (process.stdin.isTTY) process.stdin.setRawMode(true); ``` -## readline.moveCursor(stream, dx, dy\[, callback\]) +## `readline.moveCursor(stream, dx, dy[, callback])` <!-- YAML added: v0.7.7 changes: |