Skip to content

Commit

Permalink
doc,readline: use code markup/markdown in headers
Browse files Browse the repository at this point in the history
Backport-PR-URL: #31108
PR-URL: #31086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and BethGriggs committed Feb 6, 2020
1 parent 6de05ec commit 4dc930c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-->
Expand All @@ -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
-->
Expand All @@ -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
-->
Expand All @@ -84,7 +84,7 @@ rl.on('line', (input) => {
});
```

### Event: 'pause'
### Event: `'pause'`
<!-- YAML
added: v0.7.5
-->
Expand All @@ -103,7 +103,7 @@ rl.on('pause', () => {
});
```

### Event: 'resume'
### Event: `'resume'`
<!-- YAML
added: v0.7.5
-->
Expand All @@ -118,7 +118,7 @@ rl.on('resume', () => {
});
```

### Event: 'SIGCONT'
### Event: `'SIGCONT'`
<!-- YAML
added: v0.7.5
-->
Expand All @@ -141,7 +141,7 @@ rl.on('SIGCONT', () => {

The `'SIGCONT'` event is _not_ supported on Windows.

### Event: 'SIGINT'
### Event: `'SIGINT'`
<!-- YAML
added: v0.3.0
-->
Expand All @@ -161,7 +161,7 @@ rl.on('SIGINT', () => {
});
```

### Event: 'SIGTSTP'
### Event: `'SIGTSTP'`
<!-- YAML
added: v0.7.5
-->
Expand Down Expand Up @@ -189,7 +189,7 @@ rl.on('SIGTSTP', () => {

The `'SIGTSTP'` event is _not_ supported on Windows.

### rl.close()
### `rl.close()`
<!-- YAML
added: v0.1.98
-->
Expand All @@ -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
-->
Expand All @@ -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
-->
Expand All @@ -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
-->
Expand Down Expand Up @@ -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
-->
Expand All @@ -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
-->
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -349,7 +349,7 @@ async function processLineByLine() {
}
```

## readline.clearLine(stream, dir\[, callback\])
## `readline.clearLine(stream, dir[, callback])`
<!-- YAML
added: v0.7.7
changes:
Expand All @@ -371,7 +371,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:
Expand All @@ -389,7 +389,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:
Expand Down Expand Up @@ -490,7 +490,7 @@ function completer(linePartial, callback) {
}
```

## readline.cursorTo(stream, x\[, y\]\[, callback\])
## `readline.cursorTo(stream, x[, y][, callback])`
<!-- YAML
added: v0.7.7
changes:
Expand All @@ -510,7 +510,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
-->
Expand All @@ -536,7 +536,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:
Expand Down

0 comments on commit 4dc930c

Please sign in to comment.