Skip to content

Commit f521a98

Browse files
TrottMylesBorins
authored andcommitted
doc,readline: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent cf38b43 commit f521a98

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

doc/api/readline.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Once this code is invoked, the Node.js application will not terminate until the
3434
`readline.Interface` is closed because the interface waits for data to be
3535
received on the `input` stream.
3636

37-
## Class: Interface
37+
## Class: `Interface`
3838
<!-- YAML
3939
added: v0.1.104
4040
-->
@@ -47,7 +47,7 @@ single `input` [Readable][] stream and a single `output` [Writable][] stream.
4747
The `output` stream is used to print prompts for user input that arrives on,
4848
and is read from, the `input` stream.
4949

50-
### Event: 'close'
50+
### Event: `'close'`
5151
<!-- YAML
5252
added: v0.1.98
5353
-->
@@ -66,7 +66,7 @@ The listener function is called without passing any arguments.
6666
The `readline.Interface` instance is finished once the `'close'` event is
6767
emitted.
6868

69-
### Event: 'line'
69+
### Event: `'line'`
7070
<!-- YAML
7171
added: v0.1.98
7272
-->
@@ -84,7 +84,7 @@ rl.on('line', (input) => {
8484
});
8585
```
8686

87-
### Event: 'pause'
87+
### Event: `'pause'`
8888
<!-- YAML
8989
added: v0.7.5
9090
-->
@@ -103,7 +103,7 @@ rl.on('pause', () => {
103103
});
104104
```
105105

106-
### Event: 'resume'
106+
### Event: `'resume'`
107107
<!-- YAML
108108
added: v0.7.5
109109
-->
@@ -118,7 +118,7 @@ rl.on('resume', () => {
118118
});
119119
```
120120

121-
### Event: 'SIGCONT'
121+
### Event: `'SIGCONT'`
122122
<!-- YAML
123123
added: v0.7.5
124124
-->
@@ -141,7 +141,7 @@ rl.on('SIGCONT', () => {
141141

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

144-
### Event: 'SIGINT'
144+
### Event: `'SIGINT'`
145145
<!-- YAML
146146
added: v0.3.0
147147
-->
@@ -161,7 +161,7 @@ rl.on('SIGINT', () => {
161161
});
162162
```
163163

164-
### Event: 'SIGTSTP'
164+
### Event: `'SIGTSTP'`
165165
<!-- YAML
166166
added: v0.7.5
167167
-->
@@ -189,7 +189,7 @@ rl.on('SIGTSTP', () => {
189189

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

192-
### rl.close()
192+
### `rl.close()`
193193
<!-- YAML
194194
added: v0.1.98
195195
-->
@@ -201,7 +201,7 @@ the `'close'` event will be emitted.
201201
Calling `rl.close()` does not immediately stop other events (including `'line'`)
202202
from being emitted by the `readline.Interface` instance.
203203

204-
### rl.pause()
204+
### `rl.pause()`
205205
<!-- YAML
206206
added: v0.3.4
207207
-->
@@ -212,7 +212,7 @@ later if necessary.
212212
Calling `rl.pause()` does not immediately pause other events (including
213213
`'line'`) from being emitted by the `readline.Interface` instance.
214214

215-
### rl.prompt(\[preserveCursor\])
215+
### `rl.prompt([preserveCursor])`
216216
<!-- YAML
217217
added: v0.1.98
218218
-->
@@ -230,7 +230,7 @@ paused.
230230
If the `readline.Interface` was created with `output` set to `null` or
231231
`undefined` the prompt is not written.
232232

233-
### rl.question(query, callback)
233+
### `rl.question(query, callback)`
234234
<!-- YAML
235235
added: v0.3.3
236236
-->
@@ -262,14 +262,14 @@ The `callback` function passed to `rl.question()` does not follow the typical
262262
pattern of accepting an `Error` object or `null` as the first argument.
263263
The `callback` is called with the provided answer as the only argument.
264264

265-
### rl.resume()
265+
### `rl.resume()`
266266
<!-- YAML
267267
added: v0.3.4
268268
-->
269269

270270
The `rl.resume()` method resumes the `input` stream if it has been paused.
271271

272-
### rl.setPrompt(prompt)
272+
### `rl.setPrompt(prompt)`
273273
<!-- YAML
274274
added: v0.1.98
275275
-->
@@ -279,7 +279,7 @@ added: v0.1.98
279279
The `rl.setPrompt()` method sets the prompt that will be written to `output`
280280
whenever `rl.prompt()` is called.
281281

282-
### rl.write(data\[, key\])
282+
### `rl.write(data[, key])`
283283
<!-- YAML
284284
added: v0.1.98
285285
-->
@@ -312,7 +312,7 @@ rl.write(null, { ctrl: true, name: 'u' });
312312
The `rl.write()` method will write the data to the `readline` `Interface`'s
313313
`input` *as if it were provided by the user*.
314314

315-
### rl\[Symbol.asyncIterator\]()
315+
### `rl[Symbol.asyncIterator]()`
316316
<!-- YAML
317317
added: v11.4.0
318318
changes:
@@ -349,7 +349,7 @@ async function processLineByLine() {
349349
}
350350
```
351351

352-
## readline.clearLine(stream, dir\[, callback\])
352+
## `readline.clearLine(stream, dir[, callback])`
353353
<!-- YAML
354354
added: v0.7.7
355355
changes:
@@ -371,7 +371,7 @@ changes:
371371
The `readline.clearLine()` method clears current line of given [TTY][] stream
372372
in a specified direction identified by `dir`.
373373

374-
## readline.clearScreenDown(stream\[, callback\])
374+
## `readline.clearScreenDown(stream[, callback])`
375375
<!-- YAML
376376
added: v0.7.7
377377
changes:
@@ -389,7 +389,7 @@ changes:
389389
The `readline.clearScreenDown()` method clears the given [TTY][] stream from
390390
the current position of the cursor down.
391391

392-
## readline.createInterface(options)
392+
## `readline.createInterface(options)`
393393
<!-- YAML
394394
added: v0.1.98
395395
changes:
@@ -490,7 +490,7 @@ function completer(linePartial, callback) {
490490
}
491491
```
492492

493-
## readline.cursorTo(stream, x\[, y\]\[, callback\])
493+
## `readline.cursorTo(stream, x[, y][, callback])`
494494
<!-- YAML
495495
added: v0.7.7
496496
changes:
@@ -510,7 +510,7 @@ changes:
510510
The `readline.cursorTo()` method moves cursor to the specified position in a
511511
given [TTY][] `stream`.
512512

513-
## readline.emitKeypressEvents(stream\[, interface\])
513+
## `readline.emitKeypressEvents(stream[, interface])`
514514
<!-- YAML
515515
added: v0.7.7
516516
-->
@@ -536,7 +536,7 @@ if (process.stdin.isTTY)
536536
process.stdin.setRawMode(true);
537537
```
538538

539-
## readline.moveCursor(stream, dx, dy\[, callback\])
539+
## `readline.moveCursor(stream, dx, dy[, callback])`
540540
<!-- YAML
541541
added: v0.7.7
542542
changes:

0 commit comments

Comments
 (0)