Remove new line from multi-line string in YAML
To explicitly remove a new line at the end of your string, use a |-
after your key definition:
---
multiline_text: |-
Let me tell you a story...
About my multi-line string.
other_key: "I'm another key"
This would output a string like so for multiline_text
:
Let me tell you a story...\nAbout my multi-line string.
Tweet