From 952aea984260d8739c0465b889c7f68631c49026 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 a83b492b0b5621..fde95d148f7dfe 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -112,8 +112,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'`: