termynal.py icon indicating copy to clipboard operation
termynal.py copied to clipboard

Support within lists, admonitions, and content tabs

Open CollinHeist opened this issue 2 years ago • 5 comments

Hello, love the project! Thanks for your hard work.

I think it would be great if the terminals could be embedded below lists, and within admonitions / content tabs.

Thanks!

CollinHeist avatar Oct 26 '23 05:10 CollinHeist

Hi!

I thought about it. I wanted to do interoperability with mkdocs-material.

daxartio avatar Oct 26 '23 18:10 daxartio

Have you wanted to see the result like this?

image

daxartio avatar Oct 26 '23 21:10 daxartio

As far as raw HTML, yes that was what I was envisioning. After rendering, like this:

image

After briefly looking at the code, I think the termynal regex would need to be modified to handle arbitrary indentation (that takes care of lists, admonitions, and tabs), as it currently only looks for left-aligned code blocks (no \s*)

CollinHeist avatar Oct 26 '23 21:10 CollinHeist

Yeah, I am running into the same problem. I have a numbered list that I would like to show the terminal output for each step of the way, but since the terminal doesn't render when indented, I can't use it 😔

eshaben avatar Dec 15 '23 18:12 eshaben

Since version 0.12, the plugin supports content tabs

daxartio avatar Feb 16 '24 19:02 daxartio