DocStringExtensions.jl icon indicating copy to clipboard operation
DocStringExtensions.jl copied to clipboard

SUBTYPES abbreviation

Open tpapp opened this issue 7 years ago • 3 comments

It may be useful to add a SUBTYPES abbreviation that expands to something like

subtypes: [`SubType1`](@ref), [`SubType2`](@ref), ...

tpapp avatar Dec 01 '17 14:12 tpapp

Revisiting this issue, I am wondering about the utility of this abbreviation, as subtypes of a type is an essentially dynamic value that may change when new code is evaluated (eg a package is loaded). Eg if it ends up in statically generated documentation (by Documenter.jl) it can easily be inaccurate.

Thoughts? I am thinking of just closing this issue.

tpapp avatar Aug 27 '18 12:08 tpapp

That's a fair point. Maybe it should filter by module somehow?

mortenpi avatar Aug 29 '18 21:08 mortenpi

Maybe it should filter by module somehow?

That does seem like a reasonable approach, e.g. the printed out types are all subtypes of the documented type that are defined within the type's defining module or any of it's submodules and any external modules that further subtype it are not included. We could print out something to that effect as an admonition in the expanded abbreviation to warn readers.

MichaelHatherly avatar Feb 05 '23 22:02 MichaelHatherly