Skip to content

Commit

Permalink
Support stepped range syntax (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
eksperimental authored Mar 30, 2021
1 parent fd55c41 commit fd4a0c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ex_doc/autolink.ex
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ defmodule ExDoc.Autolink do
["", "", ""] ->
{:local, :..}

["//", "", ""] ->
{:local, :"..//"}

["", ""] ->
{:local, :.}

Expand Down
6 changes: 6 additions & 0 deletions test/ex_doc/autolink_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ defmodule ExDoc.AutolinkTest do

assert autolink("for/1", apps: [:elixir]) ==
~m"[`for/1`](Kernel.SpecialForms.html#for/1)"

# TODO: Remove check once Elixir v1.12+ is required
if Version.match?(System.version(), ">= 1.12.0-rc.0") do
assert autolink("..///3") ==
~m"[`..///3`](https://hexdocs.pm/elixir/Kernel.html#..///3)"
end
end

test "elixir callback" do
Expand Down

0 comments on commit fd4a0c7

Please sign in to comment.