-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting generated md files when a block starts with ??? instead of !!! #9
Comments
I think using a ```@raw html
??? info
This is import information
``` We should probably support |
this kinda works. However, it creates an exact copy after doing:
hence, we have a leftover showing up, we don't need it.
The thing inside works. This is what I have in mind
this example function is in
could we not better extended the function that deals with |
Oh, this workaround would only work in Markdown pages, not in docstrings. The docstrings get parsed before they reach Documenter, and the Base Markdown parser doesn't understand the
If you want a hack to make it work: you could use admonition syntax with a custom label (e.g. DocumenterMarkdown.jl/src/writer.jl Lines 197 to 201 in b331558
In the case of the admonition, I believe it's this method: https://github.com/JuliaLang/julia/blob/b600f51eab283333ede6e3120b104b3aa4d9043b/stdlib/Markdown/src/render/plain.jl#L73-L81 You could probably add a method that picks out the render(io::IO, ::MIME"text/plain", node::Markdown.Admonition, page, doc) = ... |
@lazarusA I'm curious which markdown parsers (in other languages) currently support |
I'm basically using the syntax from here, almost everything works. The docs for Tidier.jl are being generated using this. Another example is in YAXArrays.jl where in that case the
is surrounding this block. Edit: But maybe, it might be better to just simply define a custom admonition directly in the docs and use that one in my doc string. |
Ah, thanks, so that's coming from https://facelessuser.github.io/pymdown-extensions/extensions/details/ it appears. Sound like good additions to add at some point, and should be relatively simple ones to do. |
This seems like a good solution for your use case. Do note that the admonition types are only allowed to be single lowercase words in the Julia parser. |
@MichaelHatherly nice to hear that it might be possible to have this by default. |
Let's say I have a block in my files within the
src
folder, something likethen when I do
this outputs a new file into docs where the syntax is the same (good)
but if I do
then I get
which is not good. I'm trying to have collapsible blocks (like the ones here but collapsible).
And in order to get them, I would need to have as output in my docs folder:
any hints on how to solve this?
The text was updated successfully, but these errors were encountered: