Block Style in YAML
January 17, 2024
Block Style in YAML
I tend to forget this syntax of using block style text in YAML file. I’m writing it down here for future reference.
Literal Style
keep the new lines
key: |
line 1
line 2Folded Style
Change new lines to space except that it’s two new lines together
key: >
line 1
line 2Indentation is assumed (decided) from the first line of the text. It can also be indicated explit
key: |2
line 1
line 2Jason Ge 葛俊