diff options
Diffstat (limited to 'layouts/shortcodes/codeblock.html')
-rw-r--r-- | layouts/shortcodes/codeblock.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/shortcodes/codeblock.html b/layouts/shortcodes/codeblock.html index 95fa365..098c933 100644 --- a/layouts/shortcodes/codeblock.html +++ b/layouts/shortcodes/codeblock.html @@ -18,7 +18,7 @@ {{ end }} {{ end }} {{ $trimmedContent := trim .Inner "\n" }} -<figure class="highlight {{ $.Scratch.Get "c-language" }} language-{{ with ($.Scratch.Get "c-language") }}{{ . }}{{ end }}"> +<figure class="highlight {{ $.Scratch.Get "c-language" }} language-{{ $.Scratch.Get "c-language" }}"> <figcaption> {{ if and ($.Scratch.Get "c-url") ($.Scratch.Get "c-title") }} <span>{{ $.Scratch.Get "c-title" }}</span><a href="{{ ($.Scratch.Get "c-url") | safeURL }}" target="_blank" rel="external">{{ $.Scratch.Get "c-link-text" | default ($.Scratch.Get "c-title") }}</a> @@ -33,9 +33,9 @@ <pre>{{ range $index,$value := (split $trimmedContent "\n") }}<span class="line">{{ add $index 1 }}</span><br>{{ end }}</pre> </td> <td class="code"> - <pre class="code-highlight language-{{ $.Scratch.Get "c-language" }}"><code class="{{ $.Scratch.Get "c-language" }}">{{ $trimmedContent }}</code></pre> + <pre class="code-highlight language-{{ $.Scratch.Get "c-language" }} {{ $.Scratch.Get "c-language" }}"><code class="{{ $.Scratch.Get "c-language" }}">{{ $trimmedContent }}</code></pre> </td> </tr> </tbody> </table> -</figure>
\ No newline at end of file +</figure> |