Open StoneCypher opened 9 years ago
The triggering code is the sample code from the specification
From the spec:
The pipe character designates a multiline string. It’s placed at the end of a line (after some whitespace) and means that all following lines that end with | will be evaluated as though they were on the same line. Note that even the last line in the multiline block should end with |. For example:
%whoo
%hoo= h( |
"I think this might get " + |
"pretty long so I should " + |
"probably make it " + |
"multiline so it doesn't " + |
"look awful.") |
%p This is short.
is compiled to:
<whoo>
<hoo>I think this might get pretty long so I should probably make it multiline so it doesn't look awful.</hoo>
<p>This is short</p>
</whoo>
Instead a compilation failure occurs.
This in concert with https://github.com/creationix/haml-js/issues/74 make haml-js very difficult to use for practical real-world templates.
Fixed with #99
The HAML Spec offers a multiline notation. A HAML transform built on this library which works on similar code fails with this error: