Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/elixir/lib/io/ansi.ex
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ defmodule IO.ANSI do
end

defsequence = fn name, code, terminator ->
sequence = "\e[#{code}#{terminator}"

@spec unquote(name)() :: String.t()
def unquote(name)() do
"\e[#{unquote(code)}#{unquote(terminator)}"
unquote(sequence)
end

defp format_sequence(unquote(name)) do
unquote(name)()
unquote(sequence)
end
end

Expand Down
Loading