Skip to content

Commit fd4a0c7

Browse files
Support stepped range syntax (#1346)
1 parent fd55c41 commit fd4a0c7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/ex_doc/autolink.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ defmodule ExDoc.Autolink do
248248
["", "", ""] ->
249249
{:local, :..}
250250

251+
["//", "", ""] ->
252+
{:local, :"..//"}
253+
251254
["", ""] ->
252255
{:local, :.}
253256

test/ex_doc/autolink_test.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ defmodule ExDoc.AutolinkTest do
106106

107107
assert autolink("for/1", apps: [:elixir]) ==
108108
~m"[`for/1`](Kernel.SpecialForms.html#for/1)"
109+
110+
# TODO: Remove check once Elixir v1.12+ is required
111+
if Version.match?(System.version(), ">= 1.12.0-rc.0") do
112+
assert autolink("..///3") ==
113+
~m"[`..///3`](https://hexdocs.pm/elixir/Kernel.html#..///3)"
114+
end
109115
end
110116

111117
test "elixir callback" do

0 commit comments

Comments
 (0)