Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/codeblock.html')
-rw-r--r--layouts/shortcodes/codeblock.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/shortcodes/codeblock.html b/layouts/shortcodes/codeblock.html
index 9e210d2..098c933 100644
--- a/layouts/shortcodes/codeblock.html
+++ b/layouts/shortcodes/codeblock.html
@@ -18,9 +18,9 @@
{{ 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")) }}
+ {{ 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>
{{ else if $.Scratch.Get "c-title" }}
<span>{{ $.Scratch.Get "c-title" }}</span>
@@ -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>