termynal / termynal.py

Python markdown terminal. Built for mkdocs
https://termynal.github.io/termynal.py/
MIT License
85 stars 8 forks source link

Support for code blocks with language specified #11

Open riga opened 11 months ago

riga commented 11 months ago

Hi!

I noticed that, when specifying the language of a code block as in the following


```bash
$ git lfs install
Updated git hooks.
Git LFS initialized.
```

the actual command ($ git lfs install here) will not be identified as such, but it looks like it's treated as an output. However, some markdown linters discourage not specifying a language (e.g. MD040).

Maybe support for specifying a language could be added, and thinking further, maybe it could even be used to change the name of the shell in the header of rendered termynal frames (which defaults to "bash" right now). So when people prefer showing commands for zsh, they could specify this by doing


```zsh
$ command goes here
...
```