Keep Comments Unpublished

I try to comment my code and especially in the template area I have comments all over the place using <!-- *** -->
But then I noticed that all comments are published which clutters things up. Is there a special character wrapper we could use inside of Elements that would prevent a comment from being published ?

1 Like

you could wrap the comment in a @if statement.

@if(edit)
  <!-- my comment only shown in edit -->
@endif

Ok. FYI - noticed that text input is slowing down, probably due to the @if’s comments and I’m not even working on a complex component yet.

Could you give more info and supply a demo project where this is happening?