Skip to content

Commit

Permalink
readline: fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 18, 2023
1 parent c17d42b commit a32e9f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/internal/readline/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ function* emitKeys(stream) {
const cmd = StringPrototypeSlice(s, cmdStart);
let match;

if ((match = RegExpPrototypeExec(/^(?:(\d\d?)(?:;(\d))?[~^$]|(\d{3}~))$/, cmd))) {
if (match[3]) {
code += match[3];
if ((match = RegExpPrototypeExec(/^(?:(\d\d?)(?:;(\d))?([~^$])|(\d{3}~))$/, cmd))) {
if (match[4]) {
code += match[4];
} else {
code += match[1];
code += match[1] + match[3];
modifier = (match[2] || 1) - 1;
}
} else if (
Expand Down

0 comments on commit a32e9f6

Please sign in to comment.