From 128a69dde3db47b5b8ae44c64630c1c7815f74a1 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 PR-URL: https://github.com/nodejs/node/pull/31086 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/readline.md | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index b98f7055045ef1..cbb844886d6647 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]()` @@ -384,7 +384,7 @@ process.stdin.on('keypress', (c, k) => { }); ``` -### rl.cursor +### `rl.cursor` @@ -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()` @@ -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])` @@ -598,7 +598,7 @@ if (process.stdin.isTTY) process.stdin.setRawMode(true); ``` -## readline.moveCursor(stream, dx, dy\[, callback\]) +## `readline.moveCursor(stream, dx, dy[, callback])`