| Zeile 140... |
Zeile 140... |
| 140 |
|
140 |
|
| 141 |
private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix): string
|
141 |
private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix): string
|
| 142 |
{
|
142 |
{
|
| Zeile 143... |
Zeile 143... |
| 143 |
$output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag());
|
143 |
$output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag());
|
| 144 |
|
144 |
|
| 145 |
if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
|
145 |
if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) {
|
| 146 |
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
|
146 |
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
|
| 147 |
// http://www.yaml.org/spec/1.2/spec.html#id2793979
|
147 |
// http://www.yaml.org/spec/1.2/spec.html#id2793979
|