Skip to content

Commit 17a0abd

Browse files
bbenseJosé Valim
authored andcommitted
Added test for markup ending in . and code to pass the test
Signed-off-by: José Valim <[email protected]>
1 parent e6cfc20 commit 17a0abd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/elixir/lib/io/ansi/docs.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ defmodule IO.ANSI.Docs do
408408

409409
# Characters that can mark the beginning or the end of a word.
410410
# Only support the most common ones at this moment.
411-
@delimiters [?\s, ?', ?", ?!, ?@, ?#, ?$, ?%, ?^, ?&, ?-, ?+, ?(, ?), ?[, ?], ?{, ?}, ?<, ?>]
411+
@delimiters [?\s, ?', ?", ?!, ?@, ?#, ?$, ?%, ?^, ?&, ?-, ?+, ?(, ?), ?[, ?], ?{, ?}, ?<, ?>, ?.]
412412

413413
# Inline start
414414

lib/elixir/test/elixir/io/ansi/docs_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ defmodule IO.ANSI.DocsTest do
103103
result = format("*world*")
104104
assert result == "\e[1mworld\e[0m\n\e[0m"
105105

106+
result = format("*world*.")
107+
assert result == "\e[1mworld\e[0m.\n\e[0m"
108+
106109
result = format("**world**")
107110
assert result == "\e[1mworld\e[0m\n\e[0m"
108111

0 commit comments

Comments
 (0)