Frage

When writing HTML comments in SLIM:

/! The first line of comments
/! The second line of comments

The output becomes

<!-- The first line of comments --><!-- The second line of comments -->

All the other generated HTML is properly formatted and indented because I set pretty equal to true

I'm writing templates for other people to use so I need comments with line breaks for readability.

War es hilfreich?

Lösung

You can achieve a single multi-line comment in Slim like this:

/!
  The first line of comments
  The second line of comments

Which should output this:

<!-- The first line of comments
The second line of comments -->
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top