mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
10 lines
No EOL
316 B
HTML
10 lines
No EOL
316 B
HTML
{{ $text := . }}
|
|
|
|
{{/* if text is a multiline string add nix's double single-quotes */}}
|
|
{{ if in $text "\n" }}
|
|
{{ $text = print "''\n " (strings.TrimSuffix " " (replace $text "\n" "\n ") ) "''" }}
|
|
{{ else }}
|
|
{{ $text = $text | jsonify (dict "indent" " ") }}
|
|
{{ end }}
|
|
|
|
{{- transform.Highlight $text "nix" }} |