diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index a08a37ec98e0b..5c4b1de188045 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -146,6 +146,8 @@ public static function dump($value, $exceptionOnInvalidType = false, $objectSupp return $repr; case '' == $value: return "''"; + case strstr($value, "\n"): + return "|\n ". preg_replace( '/\n/',"\n " , $value ); case Escaper::requiresDoubleQuoting($value): return Escaper::escapeWithDoubleQuotes($value); case Escaper::requiresSingleQuoting($value):