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

# hide not working anymore

Open dahtah opened this issue 2 years ago • 3 comments

I've updated Documenter.jl to v.0.27.5 and for some reason the "# hide" command does not seem to work anymore. I use it to hide plot generation, maybe there's a preferred way of doing that now? I don't see it mentioned anywhere. Here's an example where it fails:

using Plots
p=plot(1:3)
savefig("blah.svg"); nothing # hide

The last line is displayed in the html result and no svg is produced.

dahtah avatar Sep 01 '21 15:09 dahtah

OK, figured this one out. The example blocks in my doc were failing for some other irrelevant reason, but when a block fails somewhere the hidden lines get displayed, because the droplines function in Expanders.jl gets called conditional on correct execution. In the HTML output the example block is displayed anyway, with the hidden lines, which looks like a bug. Maybe # hide lines should be hidden regardless of successful execution of the code?

dahtah avatar Sep 06 '21 08:09 dahtah

If the output is gonna be incorrect regardless I think it might be better to show the source code instead of some half-result?

fredrikekre avatar Oct 14 '21 09:10 fredrikekre

Maybe a "failed execution" block can be added as the result.

fredrikekre avatar Feb 04 '22 13:02 fredrikekre