Skip to content

Instantly share code, notes, and snippets.

@opattison
Last active February 9, 2022 22:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opattison/16dd650d276bd2b36e86 to your computer and use it in GitHub Desktop.
Save opattison/16dd650d276bd2b36e86 to your computer and use it in GitHub Desktop.
How to preserve multiple YAML lines with newlines (for example, to pass through a Markdown filter in Jekyll)
# How to preserve multiple YAML lines with newlines (for example, to pass through a Markdown filter in Jekyll)
# via: http://stackoverflow.com/questions/3790454/in-yaml-how-do-i-break-a-string-over-multiple-lines
key: |+
Hello.
World.
# Output if processed with Markdown:
# '<p>hello</p><p>world</p>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment