Rendering in a comment

7 views
Skip to first unread message

Jeff Schnitzer

unread,
Feb 7, 2012, 6:39:12 PM2/7/12
to cambridge...@googlegroups.com
I want to render some data in an HTML comment, visible when I look at
the page but otherwise not visible to the user. It's mostly for
debugging "in the real world". I try like this:

<!-- ${data} -->

However, Cambridge renders this as-is. If I remove the comments,
Cambridge renders the expression.

Is it not possible to render comments?

Thanks,
Jeff

Erdinc Yilmazel

unread,
Feb 7, 2012, 8:16:50 PM2/7/12
to cambridge...@googlegroups.com
Hmm, I think this isn't possible as of now. Cambridge parser parses comments differently and it doesn't look for expressions inside comments. The whole comment block is a separate node in the parse tree. I will look into this and see if it can be implemented easily.

Erdinc

Matthew Jaggard

unread,
Feb 8, 2012, 3:55:45 AM2/8/12
to cambridge...@googlegroups.com
Hi Erdinc,
   Could this be a new syntax - it would be good to also have the ability to have non-parsed comments as exist currently. It might also be good while you're there to create non-rendered comments (ie. comments for the next editor of the template that are not sent to the browser).

Thanks,
Mat.

Erdinc Yilmazel

unread,
Feb 8, 2012, 8:05:17 AM2/8/12
to cambridge...@googlegroups.com
Non rendered comments are already there. Just use <!--$    -->.
Reply all
Reply to author
Forward
0 new messages