kylelemons/go-gypsy — pull request #15 by moraes (2013-05-10 17:19:28+00:00)
Title: Support for empty lines in multi-line strings and rendering multi-line scalars.

This pull request adds support for empty lines in multi-line strings, allowed per YAML's literal strings spec. Also, it fixes rendering multi-line scalars. For example:

node := yaml.Map{"a": yaml.Scalar("b\n\nc"), "d": yaml.Scalar("e")}
config := yaml.Render(node)

is rendered as:

a: |
b

c
d: e

And parsing the string above will result in a node identical to the original.

Please consider it with love.