diff --git a/CHANGELOG.md b/CHANGELOG.md index 55e8d09f2b..62256e6f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fixed headers hidden by the navbar. ([#2905]) * Tightened `@ref` classification so references are matched more consistently by syntax, with header labels still taking precedence over docstrings and mistaken header/id references less likely to resolve as docstrings. ([#2678]) +* Added test coverage confirming that `@ref` links to headers defined with a multi-dash `@id` (e.g. `@id my-section-title`) resolve correctly. ([#2732]) ## Version [v1.17.0] - 2026-02-20 diff --git a/test/docsxref/make.jl b/test/docsxref/make.jl index e019f38dec..ff2c4eb109 100644 --- a/test/docsxref/make.jl +++ b/test/docsxref/make.jl @@ -157,6 +157,7 @@ end @test contains(html, "Two words") @test contains(html, "header link") @test contains(html, "header id link") + @test contains(html, "multi-dash id link") @test contains(html, "#12345") @test contains(html, "issue link") @test contains(html, "DocsReferencingMain.g") diff --git a/test/docsxref/src/index.md b/test/docsxref/src/index.md index 2181987a96..a913c0687d 100644 --- a/test/docsxref/src/index.md +++ b/test/docsxref/src/index.md @@ -5,6 +5,7 @@ On the *page* (unlike in the `g` docstring) can link directly to [`AbstractSelec Implicit link to a header (single word): [API](@ref). Explicit link to a header (single word): [header link](@ref "API"). Explicit link to a header via `@id`: [header id link](@ref api-reference). +Explicit link to a header via multi-dash `@id`: [multi-dash id link](@ref multi-word-section-id). Implicit link to a header (multiple words): [Two words](@ref). Explicit link to a header (multiple words): [header link](@ref "Two words"). @@ -52,3 +53,5 @@ Something ## [Header/docstring conflict](@id DocsReferencingMain.g) Something else + +## [Multi-word section with dashes](@id multi-word-section-id)