Skip to content
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
otp: "27"
# Test with latest Elixir and Erlang versions
- elixir: "1.19"
otp: "28"
otp: "29"
lint: true
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
fail-fast: true
matrix:
include:
- otp: 26
otp_version: "26.2.5"
elixir_version: "1.16.2"
- otp: 27
otp_version: "27.3.4.9"
elixir_version: "1.19.5"
- otp: 28
otp_version: "28.4.1"
elixir_version: "1.19.5"
- otp: 29
otp_version: "29.0"
elixir_version: "1.19.5"

runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion lib/ex_doc/language/erlang.ex
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ defmodule ExDoc.Language.Erlang do
arity = length(args)

cond do
name == :record and acc != [] ->
name == :record and args != [] and acc != [] ->
{ast, acc}

name in [:"::", :when, :%{}, :{}, :|, :->, :..., :fun] ->
Expand Down
7 changes: 7 additions & 0 deletions test/ex_doc/language/erlang_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,13 @@ defmodule ExDoc.Language.ErlangTest do
~s| <a href="https://www.erlang.org/doc/apps/erts/erlang.html#t:atom/0">atom</a>()}]].|
end

if System.otp_release() >= "29" do
test "spec referencing builtin record/0 type", c do
assert autolink_spec("-spec foo() -> record().", c) ==
~s|foo() -> <a href="https://www.erlang.org/doc/apps/erts/erlang.html#t:record/0">record</a>().|
end
end

test "callback", c do
assert autolink_spec("-callback foo() -> t().", c) ==
~s|foo() -> <a href="#t:t/0">t</a>().|
Expand Down
Loading