meteor-jade icon indicating copy to clipboard operation
meteor-jade copied to clipboard

No support for multiline attributes

Open avalanche1 opened this issue 9 years ago • 4 comments

div(data-html='<p>First very long line</p>' +
        '<p>Second very long line</p>' +
        '<p class="warn">Third very long line</p>')

Produces only <div data-html="<p>First very long line</p>"></div>.

avalanche1 avatar Oct 07 '15 14:10 avalanche1

I believe backslash is the way to break up long strings: Multiple Lines for Long Attribute Value in Jade

I think the syntax is official, since I've seen it output from an HTML to Jade converter.

dalgard avatar Oct 14 '15 09:10 dalgard

Yes, converter uses backslash. But meteor jade compiler gives Jade syntax error: Unexpected token

avalanche1 avatar Oct 14 '15 14:10 avalanche1

The backslash must be written inside the string – to escape the newline. The string is ended with a quotation mark only on the final line.

dalgard avatar Oct 14 '15 15:10 dalgard

Neither \, nor + work here.

avalanche1 avatar Oct 25 '15 14:10 avalanche1