Open nathanaelbosch opened 8 months ago
A quick and hacky implementation of this:
Weave.register_format!("custom", Weave.GitHubMarkdown(
codestart="""
```@raw html
<details><summary>Code:</summary>
```julia""",
codeend="""
```
```@raw html
</details>
```
""",
))
This makes _all_ code folded in a `<details>` block with summary `Code:`. This works well enough for my use-case, but I think a chunk option could still be valuable.
A similar issue (#425) requests foldable code blocks, and a comment also provides a simple solution to get the desired result. However, surrounding a code block with
<details>
and</details>
would also hide the output generated by Weave.jl, such as a figure. Is there any way to hide the code, but not the output?