I tried making comments in Jade / pug, but comments are displayed as text in HTML. This is my code:
doctype html html(lang='en') body / This should be a comment
What am I doing something stupid?
As written in the documentation, you can use // , which will translate into an HTML comment, or //- that wonβt be displayed in the HTML output.
//
//-
In jade we use // - for comments. If you are trying to comment on a block, make sure it must be indented correctly, as shown below -
doctype html html(lang='en') body //- This should be a comment Indent correctly for block content