zwbetz-gh / cupper-hugo-theme

An accessibility-friendly Hugo theme, ported from the original Cupper project.
https://cupper-hugo-theme.netlify.app/
MIT License
301 stars 190 forks source link

Multi-line {{<cmd>}} #42

Closed duncan-wither closed 4 years ago

duncan-wither commented 4 years ago

Is your feature request related to a problem? Please describe. When using the cmd tag for more than one line of code it concatinates the lines. The alternative is to have multiple cmd tags, however then you've seperate boxes (which I'd rather not have).

I've tried putting in //, multiple new lines and <br> but none of these work.

Describe the solution you'd like It's be excellent if

{{< cmd >}}
One line
Two line
{{< cmd >}}

Would appear in the same black box similar to:

$ One Line
$ Two Line

But anything would be great.

Describe alternatives you've considered using the default .md tabbing, or ``` but neither is as nice as the cmd tag.

Additional context Any assistance would be really appreciated.

zwbetz-gh commented 4 years ago

I like the idea. Done in https://github.com/zwbetz-gh/cupper-hugo-theme/commit/72bb0d7e7e3e623e2f751f3a9375ca6df4ed210f

zwbetz-gh commented 4 years ago

See a sample usage at https://cupper-hugo-theme.netlify.app/cmd-test/

duncan-wither commented 4 years ago

Amazing, works perfectly. Thank you.