13

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.

Steven Yuan
  • 369
  • 2
  • 3
  • 13

1 Answers1

23

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 -->
benjaminjosephw
  • 4,369
  • 3
  • 21
  • 40