Skip to content

Commit 1dbf121

Browse files
gmilejosevalim
authored andcommitted
Update io.ex (#12800)
Fix newlines in documentation for IO module
1 parent 694b9b0 commit 1dbf121

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/elixir/lib/io.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,11 +593,11 @@ defmodule IO do
593593
594594
Another example where you might want to collect a user input
595595
every new line and break on an empty line, followed by removing
596-
redundant new line characters (`"\n"`):
596+
redundant new line characters (`"\\n"`):
597597
598598
IO.stream(:stdio, :line)
599-
|> Enum.take_while(&(&1 != "\n"))
600-
|> Enum.map(&String.replace(&1, "\n", ""))
599+
|> Enum.take_while(&(&1 != "\\n"))
600+
|> Enum.map(&String.replace(&1, "\\n", ""))
601601
602602
"""
603603
@spec stream(device, :line | pos_integer) :: Enumerable.t()

0 commit comments

Comments
 (0)