Help getting admonitions + pymdowns.details to work in docs

documentation

#1

Hi all,

I’d like to use the pymdownx.details extension to create collapsible Admonition blocks in my julia docs. I’m currently using Julia 0.6 and Documenter.jl to generate the markdown files and am building docs with mkdocs.

This is the sort of docs string I’m writing:

"""
...

??? note
    Expand!

...
"""

However, the markdown gets generated like ??? note Expand!, all on a single line, and mkdocs doesn’t generate the Details properly.

Has anyone gotten Admonition + Details blocs to render properly in their Julia docs?

Thanks


#2

I 've also tried to use details for my docpages made through Documenter.jl+MkDocs+Material but so far it hasn’t worked out.


#3

The reason it doesn’t work right now is that Documenter works by parsing the source Markdown files into an AST (using the Markdown parser in Base), updates the AST and then prints it out as Markdown again. However, since the Markdown parser in Base does not support the ??? syntax, it just gets interpreted as a normal string and the newline information gets lost.

Ref: https://github.com/JuliaDocs/Documenter.jl/issues/710