Skip to content

Commit 90d72c6

Browse files
author
José Valim
committed
Support + for lists in ANSIDocs too
1 parent 5ce7ee2 commit 90d72c6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/iex/lib/iex/ansi_docs.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule IEx.ANSIDocs do
22
@moduledoc false
33

4-
@bullets [?*, ?-]
4+
@bullets [?*, ?-, ?+]
55

66
@doc """
77
Prints the head of the documentation (i.e. the function signature)

lib/iex/test/iex/ansi_docs_test.exs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ defmodule IEx.AnsiDocsTest do
8989
assert result == "• one two three\n• four"
9090
end
9191

92-
test "- nested lists are converted" do
93-
result = format("- one\n - one.one\n - one.two\n- two")
94-
assert result == "• one\n • one.one\n • one.two\n• two"
92+
test "+ list is converted" do
93+
result = format("+ one\n+ two\n+ three\n")
94+
assert result == "• one\n• two\n• three\n\e[0m"
9595
end
9696

97-
test "- lists with spaces are converted" do
98-
result = format(" - one\n - two\n - three")
99-
assert result == "• one\ntwo\nthree"
97+
test "+ and - nested lists are converted" do
98+
result = format("- one\n + one.one\n + one.two\n- two")
99+
assert result == "• one\n • one.one\n • one.two\ntwo"
100100
end
101101

102102
test "paragraphs are split" do

0 commit comments

Comments
 (0)