Skip to content

Commit 1cc6e4e

Browse files
Theo-Steineraduh95
andauthored
chore: make finishing touches on comments
Co-authored-by: Antoine du Hamel <[email protected]>
1 parent d002103 commit 1cc6e4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/readline/interface.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,17 +1323,17 @@ class Interface extends InterfaceConstructor {
13231323
default:
13241324
if (typeof s === 'string' && s) {
13251325
let nextMatch = RegExpPrototypeExec(lineEnding, s);
1326-
// If no line endings are found, just insert the string as is
1326+
// If no line endings are found, just insert the string as is.
13271327
if (nextMatch === null) {
13281328
this[kInsertString](s);
13291329
} else {
1330-
// Keep track of the end of the last match
1330+
// Keep track of the end of the last match.
13311331
let lastIndex = 0;
13321332
do {
13331333
this[kInsertString](StringPrototypeSlice(s, lastIndex, nextMatch.index));
13341334
({ lastIndex } = lineEnding);
13351335
this[kLine]();
1336-
// Restore lastIndex locally as the RegExp's state might have been overwritten by recursive calls
1336+
// Restore lastIndex as the call to kLine could have mutated it.
13371337
lineEnding.lastIndex = lastIndex;
13381338
} while ((nextMatch = RegExpPrototypeExec(lineEnding, s)) !== null);
13391339
}

0 commit comments

Comments
 (0)