Use @example within expandable block in Documenter.jl

I am using Documenter.jl and would like to place an @example block inside an expandable code block. Here is what I am trying to do ( sorry for the screenshot; the code does not properly display) :

Screenshot from 2023-11-19 08-16-08

This does not work. Is there an escape character I need to use to execute the @example block?

I think you can use two raw blocks. I use details tags a bit in docs, eg here.

3 Likes

Thank you. That’s exactly what I needed.

Hello, the workaround works but it is a bit… tricky… As you can pass a js script using the “assets” keyword in HTML(), I wonder if it possible to use js to visualize everything inside a details tag (independently of its open/close nature) except code.language-julia that should behave normally…