-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cannot format doctest with escaped string (#15)
* Add failing test * Do not use private module Code.Formatter * Document known limitation of double-escaped quotes * Update changelog
- Loading branch information
1 parent
7bd8635
commit daa05fc
Showing
7 changed files
with
184 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule EscapedQuotes do | ||
# this doctest will not be fully formatted | ||
@doc """ | ||
iex> %{ | ||
iex> data: "{\\"supply\\": 100}" | ||
iex> } | ||
%{data: | ||
"{\\"supply\\": 100}"} | ||
""" | ||
|
||
# but this one will | ||
@doc ~S""" | ||
iex> %{ | ||
...> data: "{\"supply\": 100}" | ||
...> } | ||
%{data: | ||
"{\"supply\": 100}"} | ||
""" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule EscapedQuotes do | ||
# this doctest will not be fully formatted | ||
@doc """ | ||
iex> %{ | ||
...> data: "{\\"supply\\": 100}" | ||
...> } | ||
%{data: | ||
"{\\"supply\\": 100}"} | ||
""" | ||
|
||
# but this one will | ||
@doc ~S""" | ||
iex> %{ | ||
...> data: "{\"supply\": 100}" | ||
...> } | ||
%{data: "{\"supply\": 100}"} | ||
""" | ||
end |