Skip to content

Commit

Permalink
docs: fix formatting for get_range/2 (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg authored Feb 26, 2024
1 parent 8ebc68b commit 52ba8f2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lib/sourceror.ex
Original file line number Diff line number Diff line change
Expand Up @@ -655,15 +655,17 @@ defmodule Sourceror do
## Options
- `:include_comments` - When `true`, it includes the comments into the range. Defaults to `false`.
iex> ~S"\""
...> # Foo
...> :baz # Bar
...> "\""
...> |> Sourceror.parse_string!()
...> |> Sourceror.get_range(include_comments: true)
%{start: [line: 1, column: 1], end: [line: 2, column: 11]}
- `:include_comments` - When `true`, it includes the comments into the range. Defaults to `false`.
```elixir
iex> ~S"\""
...> # Foo
...> :baz # Bar
...> "\""
...> |> Sourceror.parse_string!()
...> |> Sourceror.get_range(include_comments: true)
%{start: [line: 1, column: 1], end: [line: 2, column: 11]}
```
"""
@spec get_range(Macro.t()) :: range | nil
def get_range(quoted, opts \\ []) do
Expand Down

0 comments on commit 52ba8f2

Please sign in to comment.