From 66dbbfc62a1c71c2e974106f3f6c3a725a1a06d2 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'`: