Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  CS fix
  Fix test provider
  • Loading branch information
nicolas-grekas committed Feb 16, 2023
2 parents a3fedae + c8336db commit e8e6a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, i
{
$output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag());

if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) {
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
// http://www.yaml.org/spec/1.2/spec.html#id2793979
$blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : '';
Expand Down

0 comments on commit e8e6a1d

Please sign in to comment.