10000 [YAML] Issue #26065 block indentation indicator for some multi-line string literals by tamc · Pull Request #26066 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Conversation

tamc
Copy link
Contributor
@tamc tamc commented Feb 6, 2018
Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets #26065
License MIT
Doc PR no

Doing this:

Yaml::dump(
    ["text" => "  leading space in first line\nno leading space in last line\n"],
    2, 
    4, 
    Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK
);

Will produce this:

text: |
       leading space in first line
     no leading space in last line

Which is invalid YAML because when the first line has leading spaces it needs a block indentation indicator like this:

text: |4
      leading space in first line
    no leading space in last line

So far, this pull request just has the unit test to show the failure.

nicolas-grekas and others added 4 commits February 4, 2018 18:41
…ed tests (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] use libsodium to run Argon2i related tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#26038
| License       | MIT
| Doc PR        |

Commits
-------

5f9471e use libsodium to run Argon2i related tests
…g literals

When dumping an object to YAML.

If the first line of a mult-line string literal starts with spaces then
the YAML spec says you need to use a [block indentation indicator][1].

[1]: http://www.yaml.org/spec/1.2/spec.html#id2793979
@tamc
Copy link
Contributor Author
tamc commented Feb 6, 2018

Sorry, made the pull request against the wrong branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0