10000 Added pipe for multiline string (correctly indented), which makes them much more readable by mercmobily · Pull Request #17912 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Added pipe for multiline string (correctly indented), which makes them much more readable #17912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
More coding tandards
  • Loading branch information
mercmobily committed Feb 24, 2016
commit 2de3aeebbdcb4dcab99262918140994639f8023f
1 change: 1 addition & 0 deletions src/Symfony/Component/Yaml/Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public static function dump($value, $flags = 0, $indent = 0)
if (Yaml::DUMP_MULTI_LINE_AS_BLOCK & $flags) {
if ($indent) {
$prefix = $indent ? str_repeat(' ', $indent) : '';

return "|\n$prefix".preg_replace( '/\n/',"\n$prefix", str_replace( "\r", '', $value ) );
}
}
Expand Down
0