symfony/symfony — pull request #7669 by thephpdeveloper (2013-04-14 01:58:03+00:00)
Title: hotfix for document start and end markers

According to the [YAML 1.2 specs](http://www.yaml.org/spec/1.2/spec.html) section **2.2 Structures**, the Examples 2.7 and 2.8 show that the document start `---` and end `...` can have content (such as whitespaces and comments) before and after respectively.

The current implementation of `cleanup()` does not clean up the document start marker `---` if the marker is placed after comments. As a result, the Parser will throw an exception.

However, in this hotfix, I've changed the regular expression in the `cleanup()` process such that as long as that line contains `---` or `...` only, we remove it.

If the markers are not used, then the usage is not affected.

This is a minor change to the internal private API and does not affect the public API. Hence we can propose for this to come in Symfony YAML v2.2.2