Skip to content

Commit

Permalink
Warn that ExternalFallbacks requires Documenter 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Feb 28, 2024
1 parent 1672733 commit b3940c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/fallback.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Fallback Resolution

!!! warning
The [`ExternalFallbacks`](@ref) plugin described here is experimental.
The [`ExternalFallbacks`](@ref) plugin described here is available only with `Documenter >= v1.3.0` and should be considered experimental.

In some situations, you may need to include a docstring from an external package in your documentation – for example, you you are extending a function from that package, you may want to show the function docstring. If that docstrings contains an `@ref` link, you have a problem: that link is resolvable in the external documentation, but not in *your* documentation.

Expand Down
3 changes: 2 additions & 1 deletion src/fallback.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import Documenter: XRefResolvers, Selectors, xref_unresolved
"""Plugin for letting `@ref` links fall back to `@extref` links.
!!! warning
This plugin is experimental.
This plugin is available only with `Documenter >= v1.3.0` and should be
considered as experimental.
```julia
fallbacks = ExternalFallbacks(pairs...)
Expand Down
6 changes: 3 additions & 3 deletions test/test_expand_extrefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ function parse_md_link(text)
mdpage = Markdown.parse(text)
paragraph = first(convert(MarkdownAST.Node, mdpage).children)
if length(paragraph.children) != 1
@error "citation $(repr(text)) must parse into a single MarkdownAST.Link" ast =
@error "link text $(repr(text)) must parse into a single MarkdownAST.Link" ast =
collect(paragraph.children)
error("Invalid citation: $(repr(text))")
error("Invalid link text: $(repr(text))")
end
link = first(paragraph.children)
if !(link.element isa MarkdownAST.Link)
@error "citation $(repr(text)) must parse into MarkdownAST.Link" ast = link
error("Invalid citation: $(repr(text))")
error("Invalid link text: $(repr(text))")
end
return link
end
Expand Down

0 comments on commit b3940c0

Please # to comment.