mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.33k stars 32 forks source link

feat: add `+no_margin` to remove margin in code blocks #363

Closed mfontanini closed 2 months ago

mfontanini commented 2 months ago

This adds a +no_margin attribute to code blocks which removes extra margins. For themes that specify a vertical/horizontal padding (like all built in themes), the padding is still present even when using this. This only removes the margin that typically extends a bit right if your code snippet's max line length is too short.

This is especially useful when using +exec_replace so you don't get any extra margin and instead get the executed program's output as-is. For example, the following now looks like this:

```bash +exec_replace +no_margin
echo "hello world" | qrencode -t utf8
```

image

Fixes #349