fix: do not create empty newlines when inserting YAML
Implementation of #260 (closed). This removes blank lines inserted by toYaml. It was also neccessary to switch indent to nindent to create the starting newline when YAML is actually inserted.
While working at this I found two other issues:
- some indentations seem wrong
- there are blank newlines from other template functions (mostly
if)
I can also solve this in this MR or I can create separate Issues/MRs for this, what approach do you prefer?