Skip to content

Commit

Permalink
doc: make small improvements to REPL doc
Browse files Browse the repository at this point in the history
* button -> key
* apply missing kbd element
* revise "Recoverable errors" text for brevity and clarity

PR-URL: #35808
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and BethGriggs committed Dec 15, 2020
1 parent 02f9a2a commit 2984974
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ forwards.

Duplicated history entires will be skipped.

Entries are accepted as soon as any button is pressed that doesn't correspond
Entries are accepted as soon as any key is pressed that doesn't correspond
with the reverse search. Cancelling is possible by pressing <kbd>Esc</kbd> or
<kbd>Ctrl</kbd>+<kbd>C</kbd>.

Expand Down Expand Up @@ -285,10 +285,9 @@ repl.start({ prompt: '> ', eval: myEval });

#### Recoverable errors

As a user is typing input into the REPL prompt, pressing **Enter** will
send the current line of input to the `eval` function. In order to support
multi-line input, the eval function can return an instance of `repl.Recoverable`
to the provided callback function:
At the REPL prompt, pressing <kbd>Enter</kbd> sends the current line of input to
the `eval` function. In order to support multi-line input, the `eval` function
can return an instance of `repl.Recoverable` to the provided callback function:

```js
function myEval(cmd, context, filename, callback) {
Expand Down

0 comments on commit 2984974

Please sign in to comment.