diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-02-21 10:02:51 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-02-21 10:02:51 +0100 |
commit | 4560261b58bae36316c525a43fee1e027705e92b (patch) | |
tree | 7ccac5ee434f3a18d11a934137f43dd07d617893 /docs/layouts/shortcodes | |
parent | 772128485a7e94932cd18b5e3a78d8cfb273e797 (diff) | |
parent | 374d184e6747678364fd61f5faf328ec9205eb6b (diff) |
Merge commit '374d184e6747678364fd61f5faf328ec9205eb6b'
Diffstat (limited to 'docs/layouts/shortcodes')
-rw-r--r-- | docs/layouts/shortcodes/code.html | 2 | ||||
-rw-r--r-- | docs/layouts/shortcodes/readfile.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/layouts/shortcodes/code.html b/docs/layouts/shortcodes/code.html index f40cf071d..4c12b0f29 100644 --- a/docs/layouts/shortcodes/code.html +++ b/docs/layouts/shortcodes/code.html @@ -11,7 +11,7 @@ {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} {{end}} <div class="code-copy-content nt3" {{with .Get "download"}}id="{{.}}"{{end}}> - {{ if $isHTML }}{{- highlight .Inner "html" "" | -}}{{ else }}<pre><code>{{- .Inner | string -}}</code></pre>{{ end }} + {{ if .Get "nocode" }}{{ .Inner }}{{ else }}{{ if $isHTML }}{{- highlight .Inner "html" "" | -}}{{ else }}<pre><code>{{- .Inner | string -}}</code></pre>{{ end }}{{ end }} </div> </div> diff --git a/docs/layouts/shortcodes/readfile.html b/docs/layouts/shortcodes/readfile.html index f777abe26..36400ac55 100644 --- a/docs/layouts/shortcodes/readfile.html +++ b/docs/layouts/shortcodes/readfile.html @@ -1,6 +1,8 @@ {{$file := .Get "file"}} {{- if eq (.Get "markdown") "true" -}} {{- $file | readFile | markdownify -}} +{{- else if (.Get "highlight") -}} +{{- highlight ($file | readFile) (.Get "highlight") "" -}} {{- else -}} {{ $file | readFile | safeHTML }} {{- end -}}
\ No newline at end of file |