Skip to content

Commit a93ce08

Browse files
authored
Fix typos in IO documentation (#14398)
Closes #14397.
1 parent 068015e commit a93ce08

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/elixir/lib/io.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ defmodule IO do
131131
defguardp is_device(term) when is_atom(term) or is_pid(term)
132132
defguardp is_iodata(data) when is_list(data) or is_binary(data)
133133

134-
@doc """
134+
@doc ~S"""
135135
Reads from the IO `device`.
136136
137137
The `device` is iterated as specified by the `line_or_chars` argument:
@@ -141,7 +141,7 @@ defmodule IO do
141141
non-textual inputs.
142142
143143
* if `line_or_chars` is `:line`, the device is iterated line by line.
144-
CRFL newlines ("\r\n") are automatically normalized to "\n".
144+
CRLF newlines ("\r\n") are automatically normalized to "\n".
145145
146146
* if `line_or_chars` is `:eof` (since v1.13), the device is iterated until `:eof`.
147147
If the device is already at the end, it returns `:eof` itself.
@@ -186,7 +186,7 @@ defmodule IO do
186186
:io.get_chars(map_dev(device), ~c"", count)
187187
end
188188

189-
@doc """
189+
@doc ~S"""
190190
Reads from the IO `device`. The operation is Unicode unsafe.
191191
192192
The `device` is iterated as specified by the `line_or_chars` argument:
@@ -196,7 +196,7 @@ defmodule IO do
196196
non-textual inputs.
197197
198198
* if `line_or_chars` is `:line`, the device is iterated line by line.
199-
CRFL newlines ("\r\n") are automatically normalized to "\n".
199+
CRLF newlines ("\r\n") are automatically normalized to "\n".
200200
201201
* if `line_or_chars` is `:eof` (since v1.13), the device is iterated until `:eof`.
202202
If the device is already at the end, it returns `:eof` itself.
@@ -603,7 +603,7 @@ defmodule IO do
603603
@spec stream() :: Enumerable.t(String.t())
604604
def stream, do: stream(:stdio, :line)
605605

606-
@doc """
606+
@doc ~S"""
607607
Converts the IO `device` into an `IO.Stream`.
608608
609609
An `IO.Stream` implements both `Enumerable` and
@@ -632,11 +632,11 @@ defmodule IO do
632632
633633
Another example where you might want to collect a user input
634634
every new line and break on an empty line, followed by removing
635-
redundant new line characters (`"\\n"`):
635+
redundant new line characters (`"\n"`):
636636
637637
IO.stream(:stdio, :line)
638-
|> Enum.take_while(&(&1 != "\\n"))
639-
|> Enum.map(&String.replace(&1, "\\n", ""))
638+
|> Enum.take_while(&(&1 != "\n"))
639+
|> Enum.map(&String.replace(&1, "\n", ""))
640640
641641
"""
642642
@spec stream(device, :line | pos_integer) :: Enumerable.t()
@@ -658,7 +658,7 @@ defmodule IO do
658658
@spec binstream() :: Enumerable.t(binary)
659659
def binstream, do: binstream(:stdio, :line)
660660

661-
@doc """
661+
@doc ~S"""
662662
Converts the IO `device` into an `IO.Stream`. The operation is Unicode unsafe.
663663
664664
An `IO.Stream` implements both `Enumerable` and

0 commit comments

Comments
 (0)