From 9ca825192f2a2543626af2ea01336b4884238fc3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 24 Dec 2019 15:17:52 -0800 Subject: [PATCH] doc,tty: 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/tty.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/api/tty.md b/doc/api/tty.md index 186a236b57f814..0c2f963750fd1f 100644 --- a/doc/api/tty.md +++ b/doc/api/tty.md @@ -30,7 +30,7 @@ In most cases, there should be little to no reason for an application to manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes. -## Class: tty.ReadStream +## Class: `tty.ReadStream` @@ -41,7 +41,7 @@ Represents the readable side of a TTY. In normal circumstances [`process.stdin`][] will be the only `tty.ReadStream` instance in a Node.js process and there should be no reason to create additional instances. -### readStream.isRaw +### `readStream.isRaw` @@ -49,14 +49,14 @@ added: v0.7.7 A `boolean` that is `true` if the TTY is currently configured to operate as a raw device. Defaults to `false`. -### readStream.isTTY +### `readStream.isTTY` A `boolean` that is always `true` for `tty.ReadStream` instances. -### readStream.setRawMode(mode) +### `readStream.setRawMode(mode)` @@ -74,7 +74,7 @@ including modifiers. Additionally, all special processing of characters by the terminal is disabled, including echoing input characters. `CTRL`+`C` will no longer cause a `SIGINT` when in this mode. -## Class: tty.WriteStream +## Class: `tty.WriteStream` @@ -86,7 +86,7 @@ Represents the writable side of a TTY. In normal circumstances, `tty.WriteStream` instances created for a Node.js process and there should be no reason to create additional instances. -### Event: 'resize' +### Event: `'resize'` @@ -102,7 +102,7 @@ process.stdout.on('resize', () => { }); ``` -### writeStream.clearLine(dir\[, callback\]) +### `writeStream.clearLine(dir[, callback])` @@ -148,7 +148,7 @@ added: v0.7.7 A `number` specifying the number of columns the TTY currently has. This property is updated whenever the `'resize'` event is emitted. -### writeStream.cursorTo(x\[, y\]\[, callback\]) +### `writeStream.cursorTo(x[, y][, callback])` @@ -202,7 +202,7 @@ To enforce a specific color support, use one of the below environment settings. Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. -### writeStream.getWindowSize() +### `writeStream.getWindowSize()` @@ -214,7 +214,7 @@ corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number of columns and rows in the corresponding [TTY](tty.html). -### writeStream.hasColors(\[count\]\[, env\]) +### `writeStream.hasColors([count][, env])` @@ -243,14 +243,14 @@ process.stdout.hasColors(2 ** 24, { TMUX: '1' }); // Returns false (the environment setting pretends to support 2 ** 8 colors). ``` -### writeStream.isTTY +### `writeStream.isTTY` A `boolean` that is always `true`. -### writeStream.moveCursor(dx, dy\[, callback\]) +### `writeStream.moveCursor(dx, dy[, callback])` @@ -277,7 +277,7 @@ added: v0.7.7 A `number` specifying the number of rows the TTY currently has. This property is updated whenever the `'resize'` event is emitted. -## tty.isatty(fd) +## `tty.isatty(fd)`