From 4a6d0ac436e0667fcf308e9f56f971caf8b6840f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1ri=20Tristan=20Helgason?= Date: Thu, 28 Jan 2016 11:01:20 +0000 Subject: [PATCH] doc: update eol handling in readline This commit explicitly calls out the end of line sequences used to generate line events in the readline module. Fixes: https://github.com/nodejs/node/issues/4916 PR-URL: https://github.com/nodejs/node/pull/4927 Reviewed-By: Colin Ihrig --- doc/api/readline.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index 5a03e445885772..1e32507b810db9 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -118,8 +118,9 @@ the `input` stream receives a `^C`, respectively known as `SIGINT`. `function (line) {}` -Emitted whenever the `input` stream receives a `\n`, usually received when the -user hits enter, or return. This is a good hook to listen for user input. +Emitted whenever the `input` stream receives an end of line (`\n`, `\r`, or +`\r\n`), usually received when the user hits enter, or return. This is a good +hook to listen for user input. Example of listening for `'line'`: