This commit is contained in:
zwbetz-gh 2020-08-04 21:25:42 -05:00
parent b4d6db179a
commit 72bb0d7e7e
3 changed files with 21 additions and 2 deletions

View File

@ -161,7 +161,7 @@ code {
}
.cmd code {
color: #fefefe;
white-space: nowrap;
white-space: pre-wrap;
}
.cmd code::before {
content: '$';

View File

@ -0,0 +1,13 @@
---
title: "cmd Test"
date: 2020-08-04T21:05:05-05:00
tags: [issue]
---
Testing out GitHub issue https://github.com/zwbetz-gh/cupper-hugo-theme/issues/42
{{< cmd >}}
Line 1
Line 2
Line 3
{{</ cmd >}}

View File

@ -1 +1,7 @@
<pre class="cmd"><code>{{ trim .Inner "\n" }}</code></pre>
{{ $trimmed := (trim .Inner "\n") }}
{{ $lines := split $trimmed "\n" }}
<pre class="cmd">
{{ range $lines }}
<code>{{ . }}</code>
{{ end }}
</pre>