Skip to content

Add markdown code type #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ defmodule Tesla.Middleware.SomeMiddleware do
### Examples
```
```elixir
defmodule MyClient do
use Tesla
Expand Down
2 changes: 1 addition & 1 deletion lib/tesla/builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defmodule Tesla.Builder do
@doc """
Attach middleware to your API client.
```
```elixir
defmodule ExampleApi do
use Tesla
Expand Down
8 changes: 4 additions & 4 deletions lib/tesla/middleware/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ defmodule Tesla.Middleware.Logger do
## Examples
```
```elixir
defmodule MyClient do
use Tesla
Expand All @@ -86,13 +86,13 @@ defmodule Tesla.Middleware.Logger do
It can be changed globally with config:
```
```elixir
config :tesla, Tesla.Middleware.Logger, format: "$method $url ====> $status / time=$time"
```
Or you can customize this setting by providing your own `format` function:
```
```elixir
defmodule MyClient do
use Tesla
Expand All @@ -114,7 +114,7 @@ defmodule Tesla.Middleware.Logger do
You can customize this setting by providing your own `log_level/1` function:
```
```elixir
defmodule MyClient do
use Tesla
Expand Down
8 changes: 4 additions & 4 deletions lib/tesla/mock.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Tesla.Mock do
## Setup
```
```elixir
# config/test.exs
config :tesla, adapter: Tesla.Mock
Expand All @@ -14,7 +14,7 @@ defmodule Tesla.Mock do
## Examples
```
```elixir
defmodule MyAppTest do
use ExUnit.Case
Expand All @@ -37,7 +37,7 @@ defmodule Tesla.Mock do
## Setting up mocks
```
```elixir
# Match on method & url and return whole Tesla.Env
Tesla.Mock.mock(fn
%{method: :get, url: "http://example.com/list"} ->
Expand Down Expand Up @@ -83,7 +83,7 @@ defmodule Tesla.Mock do
To solve this issue it is possible to setup a global mock
using `mock_global/1` function.
```
```elixir
defmodule MyTest do
use ExUnit.Case, async: false # must be false!
Expand Down