8000 RFC: Issue with nested string blocks that contain hashes. by jezhalford · Pull Request #12 · symfony/yaml · GitHub
[go: up one dir, main page]

Skip to content

RFC: Issue with nested string blocks that contain hashes. #12

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
8000

Conversation

jezhalford
Copy link

Adding this failing test to demonstrate the issue I'm seeing. I'm afraid a fix has me puzzled for the moment.

Lines starting with a hash, within deeply-nested string blocks, are stripped from the parsed output.

Lines starting with a hash within top-level string blocks are parsed correctly and end up in the output.

So

my:
    nested:
        block: |
            This is a bit
            # of text
            as an example

Will parse to

array(
    'my' => array(
        'nested' => array(
            'block' => "This is a bit\nas an example\n"
        )
    )
)

But it should be

array(
    'my' => array(
        'nested' => array(
            'block' => "This is a bit\n# of text\nas an example\n"
        )
    )
)

But

stuff:|
    Something that
    # works well

Parses to

array('stuff' => "Something that\n# works well");

...as far as I can tell.

Make sense?

Thanks.

Lines starting with a hash, within deeply-nested string blocks,
are stripped from the parsed output.

Lines starting with a hash within top-level string blocks are
parsed correctly and end up in the output.
@jezhalford
Copy link
Author

Closing - this is the same issue reported here symfony/symfony#12478

@jezhalford jezhalford closed this Feb 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0