Re: Escaping # sign at start of line in literal block

Kirill Simonov <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
Hi Tom,

> I am trying to write some markdown in yaml for a symfony.
> 
> I have a literal block:
> 
> Post:
>    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:

Post:
    title:    My Title
    content:  |2

      ## This is a heading


I'm not sure if the yaml parser you are using would understand it though.

Thanks,
Kirill

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.