From f521a989395776473d2f4dd1d0f29d5936ed218e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 24 Dec 2019 14:56:39 -0800 Subject: [PATCH] doc,readline: use code markup/markdown in headers Backport-PR-URL: https://github.com/nodejs/node/pull/31108 PR-URL: https://github.com/nodejs/node/pull/31086 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/readline.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index ceda170bc2bf5d..b74cad03befa12 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` @@ -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'` @@ -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'` @@ -84,7 +84,7 @@ rl.on('line', (input) => { }); ``` -### Event: 'pause' +### Event: `'pause'` @@ -103,7 +103,7 @@ rl.on('pause', () => { }); ``` -### Event: 'resume' +### Event: `'resume'` @@ -118,7 +118,7 @@ rl.on('resume', () => { }); ``` -### Event: 'SIGCONT' +### Event: `'SIGCONT'` @@ -141,7 +141,7 @@ rl.on('SIGCONT', () => { The `'SIGCONT'` event is _not_ supported on Windows. -### Event: 'SIGINT' +### Event: `'SIGINT'` @@ -161,7 +161,7 @@ rl.on('SIGINT', () => { }); ``` -### Event: 'SIGTSTP' +### Event: `'SIGTSTP'` @@ -189,7 +189,7 @@ rl.on('SIGTSTP', () => { The `'SIGTSTP'` event is _not_ supported on Windows. -### rl.close() +### `rl.close()` @@ -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()` @@ -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])` @@ -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)` @@ -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()` The `rl.resume()` method resumes the `input` stream if it has been paused. -### rl.setPrompt(prompt) +### `rl.setPrompt(prompt)` @@ -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])` @@ -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]()` @@ -536,7 +536,7 @@ if (process.stdin.isTTY) process.stdin.setRawMode(true); ``` -## readline.moveCursor(stream, dx, dy\[, callback\]) +## `readline.moveCursor(stream, dx, dy[, callback])`