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

```@repl block inside !!! note doesn't show output

Open shashi opened this issue 7 years ago • 3 comments

@repl block inside an !!! note is neither stylized as the REPL nor is the output shown. Is this intended?

shashi avatar May 25 '17 15:05 shashi

Can confirm. Other special blocks seem to be ignored in admonitions as well. Thanks for the report!

mortenpi avatar May 26 '17 01:05 mortenpi

I'm rather sure that the issue comes from src/Expanders.jl#L25-L32 -- the expander functions are only called on top-level blocks, and not recursively through the AST.

mortenpi avatar May 27 '17 06:05 mortenpi

I just stumbled upon the same problem---is it not resolved yet? Or is there a workaround?

nluetts avatar Sep 18 '20 11:09 nluetts

I'd really like to see this fixed, and I'm happy to give a hand doing so. However, since there have already been two attempts which seem to eventually have run out of steam, I thought I'd ask for some input first on what people think would be the best way to resolve this.

ettersi avatar Oct 12 '22 02:10 ettersi

Is there anything wrong with https://github.com/JuliaDocs/Documenter.jl/pull/1747?

KristofferC avatar Oct 12 '22 14:10 KristofferC

Yes - it isn't merged yet! 😉 Other than that, I'm wondering the same.

ettersi avatar Oct 12 '22 15:10 ettersi

#1747 contains some unnecessary changes as far as I can tell. But I think the general approach there is good (create a new expander step that recurses for certain elements, but only calls a subset of expander steps then). It needs to be updated to the new MarkdownAST-based tree though. @ettersi I'd say you're welcome to adopt that PR to finish it up if you'd like.

mortenpi avatar Oct 16 '22 23:10 mortenpi

What's the recommended way to "adopt" a PR? I believe I can't fork a PR. I can of course create a new PR, but that would erase @jmert from the history, which doesn't seem fair.

ettersi avatar Oct 17 '22 00:10 ettersi

You'd have to start a new PR on your fork, but you can use their latest commit as a starting point (although, it might be easier to just re-do it from scratch, since merging with master might be more work at this point). One way or another, I'll make sure that there is a Co-Authored-By in the commit message when we merge.

mortenpi avatar Oct 17 '22 00:10 mortenpi

Done: https://github.com/JuliaDocs/Documenter.jl/pull/1970

ettersi avatar Oct 18 '22 02:10 ettersi