Apply suggestions from code review

Co-Authored-By: Radek Kozie. <radoslaw.koziel@gmail.com>
This commit is contained in:
Joel Knight 2020-01-26 14:53:18 -07:00
parent 92cc5bcd23
commit a1c203cb17

View File

@ -3,21 +3,19 @@
<pre><code>{{ $inner }}</code></pre> <pre><code>{{ $inner }}</code></pre>
{{ else }} {{ else }}
{{ if .IsNamedParams }} {{ if .IsNamedParams }}
<pre <pre class="
class=" {{- if .Get "lang" }}language-{{ .Get "lang" }}{{ end }}
{{ if .Get "lang" }}language-{{ .Get "lang" }} {{ end }} {{- if .Get "line-numbers" }} line-numbers{{ end }}
{{ if .Get "line-numbers" }} line-numbers{{ end }} {{- if .Get "command-line" }} command-line{{ end }}"
{{ if .Get "command-line" }} command-line{{ end }} {{- /* line highlight plugin */ -}}
" {{- if .Get "line" }} data-line="{{ .Get "line" }}"{{ end }}
{{/* line highlight plugin */}} {{- /* line number plugin */ -}}
{{ if .Get "line" }} data-line={{ .Get "line" }} {{ end }} {{- if .Get "start" }} data-start="{{ .Get "start" }}"{{ end }}
{{/* line number plugin */}} {{- /* command-line plugin */ -}}
{{ if .Get "start" }} data-start={{ .Get "start" }} {{ end }} {{- if .Get "user" }} data-user="{{ .Get "user" }}"{{ end }}
{{/* command-line plugin */}} {{- if .Get "host" }} data-host="{{ .Get "host" }}"{{ end }}
{{ if .Get "user" }} data-user={{ .Get "user" }} {{ end }} {{- if .Get "prompt" }} data-prompt="{{ .Get "prompt" }}"{{ end }}
{{ if .Get "host" }} data-host={{ .Get "host" }} {{ end }} {{- if .Get "output" }} data-output="{{ .Get "output" }}"{{ end }}
{{ if .Get "prompt" }} data-prompt={{ .Get "prompt" }} {{ end }}
{{ if .Get "output" }} data-output={{ .Get "output" }} {{ end }}
><code {{ if .Get "lang" }}class="language-{{ .Get "lang" }}"{{ end }} ><code {{ if .Get "lang" }}class="language-{{ .Get "lang" }}"{{ end }}
>{{ $inner }}</code></pre> >{{ $inner }}</code></pre>
{{ else }} {{ else }}