Skip to content

Commit 128a69d

Browse files
TrottBridgeAR
authored andcommitted
doc,readline: use code markup/markdown in headers
PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 125a59a commit 128a69d

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

doc/api/readline.md

+25-25
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-
### rl.line
352+
### `rl.line`
353353
<!-- YAML
354354
added: 0.1.98
355355
-->
@@ -384,7 +384,7 @@ process.stdin.on('keypress', (c, k) => {
384384
});
385385
```
386386

387-
### rl.cursor
387+
### `rl.cursor`
388388
<!-- YAML
389389
added: 0.1.98
390390
-->
@@ -398,7 +398,7 @@ reading input from a TTY stream. The position of cursor determines the
398398
portion of the input string that will be modified as input is processed,
399399
as well as the column where the terminal caret will be rendered.
400400

401-
### rl.getCursorPos()
401+
### `rl.getCursorPos()`
402402
<!-- YAML
403403
added: v13.5.0
404404
-->
@@ -411,7 +411,7 @@ Returns the real position of the cursor in relation to the input
411411
prompt + string. Long input (wrapping) strings, as well as multiple
412412
line prompts are included in the calculations.
413413

414-
## readline.clearLine(stream, dir\[, callback\])
414+
## `readline.clearLine(stream, dir[, callback])`
415415
<!-- YAML
416416
added: v0.7.7
417417
changes:
@@ -433,7 +433,7 @@ changes:
433433
The `readline.clearLine()` method clears current line of given [TTY][] stream
434434
in a specified direction identified by `dir`.
435435

436-
## readline.clearScreenDown(stream\[, callback\])
436+
## `readline.clearScreenDown(stream[, callback])`
437437
<!-- YAML
438438
added: v0.7.7
439439
changes:
@@ -451,7 +451,7 @@ changes:
451451
The `readline.clearScreenDown()` method clears the given [TTY][] stream from
452452
the current position of the cursor down.
453453

454-
## readline.createInterface(options)
454+
## `readline.createInterface(options)`
455455
<!-- YAML
456456
added: v0.1.98
457457
changes:
@@ -552,7 +552,7 @@ function completer(linePartial, callback) {
552552
}
553553
```
554554

555-
## readline.cursorTo(stream, x\[, y\]\[, callback\])
555+
## `readline.cursorTo(stream, x[, y][, callback])`
556556
<!-- YAML
557557
added: v0.7.7
558558
changes:
@@ -572,7 +572,7 @@ changes:
572572
The `readline.cursorTo()` method moves cursor to the specified position in a
573573
given [TTY][] `stream`.
574574

575-
## readline.emitKeypressEvents(stream\[, interface\])
575+
## `readline.emitKeypressEvents(stream[, interface])`
576576
<!-- YAML
577577
added: v0.7.7
578578
-->
@@ -598,7 +598,7 @@ if (process.stdin.isTTY)
598598
process.stdin.setRawMode(true);
599599
```
600600

601-
## readline.moveCursor(stream, dx, dy\[, callback\])
601+
## `readline.moveCursor(stream, dx, dy[, callback])`
602602
<!-- YAML
603603
added: v0.7.7
604604
changes:

0 commit comments

Comments
 (0)