Merge commit '374d184e6747678364fd61f5faf328ec9205eb6b'

This commit is contained in:
Bjørn Erik Pedersen
2018-02-21 10:02:51 +01:00
56 changed files with 368 additions and 274 deletions

View File

@@ -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>

View File

@@ -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 -}}