HTML comments in Spark view

How can I comment on parts of a Spark view so that they are not shared with the client?

In aspx pages I can do this:

<%-- server-side comment --%> 

I thought using three dashes would work:

 <!--- server-side comment ---> 

but it does not work, and now I can not find the resource where I read it.

+6
asp.net-mvc spark-view-engine
source share
2 answers

I use

 # /* Comment Goes Here # */ 

( EDIT ). Even better, just use ASPX style tags:

 <title> Hello World <% /* comment goes here */ %> </title> 

And of course, HTML comments always work unless you mind seeing the comment in your source.

+4
source share

This is ridiculous, I also could not find. I studied the source code of a spark in the field of parsing. I found code grammar analysis that I believe applies to code blocks. There you can use //. Then, in the grammar markup, the only mention of comments is the standard HTML comment ( <!-- --> ).

+1
source share

All Articles