Escape hash sign in Yaml multiline text

Viewed 5016

Is it possible to escape a hash sign (#) from a multiline text?

...
-
    my_story: |
        Line 1
        Line 2
        # Hash line

What I was hoping to get is:

array {
    'my_story' => 'Line 1
Line 2
# Hash line'
}

If I wrap the hash line with quotes I get them in the text:

'Line 1
Line 2
"# Hash line"'

Any ideas..?

1 Answers
Related