Skip to content

at-doc return type depends on whether REPL is loaded #55438

Closed
@stevengj

Description

@stevengj

Normally, the @doc macro returns a Markdown.MD object:

% julia -e "println(typeof(@doc Real))"
Markdown.MD

However, in nightly (1.12.0-DEV.1030) the return type is Base.Docs.DocStr unless the REPL module is imported:

% ./julia -e "println(typeof(@doc Real))"
Base.Docs.DocStr
% ./julia -e "import REPL; println(typeof(@doc Real))"
Markdown.MD

This seems like a bug — I noticed it because of a test failure JuliaIO/StructIO.jl#30 in the StructIO.jl package (since package tests do not load the REPL module by default, a test for a documentation string was failing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviordocsystemThe documentation building systemregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions