Skip to content

Commit

Permalink
Add prompt formatting example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska committed Feb 27, 2024
1 parent e9eb903 commit ba22088
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ Elixir 1.13.2 or up is required. Versions lower than 1.13 do not support formatt

Run `mix format`.

This formatter plugin will not only format the Elixir code inside the doctest, but it will format the test's `iex>` prompt as well. It will always use `iex>` for the first line of the test, and `...>` for each next line. For example:

```elixir
@doc """
iex> "Hello, " <>
iex> "World!"
3
"""

# becomes:

@doc """
iex> "Hello, " <>
...> "World!"
3
"""
```

## Known limitations

### Dynamic value
Expand Down

0 comments on commit ba22088

Please sign in to comment.