mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
docs: use text attribute for default/example
This commit is contained in:
parent
2b8e452ef2
commit
0456c92538
2 changed files with 6 additions and 8 deletions
|
|
@ -1,10 +1,8 @@
|
|||
{{ $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" " ") }}
|
||||
{{ if not $text }}
|
||||
{{/* add a blank character to prevent poor formatting */}}
|
||||
{{ $text = " " }}
|
||||
{{ end }}
|
||||
|
||||
{{- transform.Highlight $text "nix" }}
|
||||
{{- transform.Highlight $text "nix" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue