> I am trying to write some markdown in yaml for a symfony.
> I have a literal block:
> title: My Title
> content: |
> ## This is a heading
> Now, unfortunately the whole line with the header on it is ignored
> because it is considered a comment. Is there any way to escape the #
> sign? I have tried a back slash but that is just passed as a backslash.
> Is there any way to escape the # at the start of a line in a literal block?
It looks like a bug in the yaml parser in symfony. The literal block is
valid and the line starting with ## should be considered a part of a
scalar, not a comment (see http://yaml.org/spec/1.1/#id927035).
You may try to use explicit indentation indicator, so that your post
will look like this:
title: My Title
## This is a heading
I'm not sure if the yaml parser you are using would understand it though.