Skip to content

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