Skip to content

Instantly share code, notes, and snippets.

@gdiggs
Created June 10, 2011 20:57
Show Gist options
  • Save gdiggs/1019759 to your computer and use it in GitHub Desktop.
Save gdiggs/1019759 to your computer and use it in GitHub Desktop.
multi-line haml comments
-# This comment can be
split up in multiple lines just
by indentation!
Mike
doesn't
like
these
comments
.
@pahnin
Copy link

pahnin commented Sep 21, 2012

no one likes them, they are useless

@DaVince
Copy link

DaVince commented Dec 5, 2017

Thanks for this, this was very useful.

@jiggneshhgohel
Copy link

Thanks. I too found this useful. Also I found following at https://haml.info/docs/yardoc/file.REFERENCE.html#haml-comments--

You can also nest text beneath a silent comment. None of this text will be rendered. For example:

%p foo
-#
  This won't be displayed
    Nor will this
                   Nor will this.
%p bar

is compiled to:

<p>foo</p>
<p>bar</p>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment