Skip to content

Instantly share code, notes, and snippets.

@andreaseriksson
Created May 28, 2013 06:05
Show Gist options
  • Save andreaseriksson/5660756 to your computer and use it in GitHub Desktop.
Save andreaseriksson/5660756 to your computer and use it in GitHub Desktop.
HAML
<strong class="code" id="message">Hello, World!</strong>
%strong{:class => "code", :id => "message"} Hello, World!
%strong.code#message Hello, World!
================================================================
<div class='item' id='item<%= item.id %>'>
<%= item.body %>
</div>
.item{:id => "item#{item.id}"}= item.body
================================================================
<div>
<!-- start foo -->
<div data-id="<%= foo.id %>">
<%= foo.name %>
</div><!-- end foo -->
</div>
%div
/ start foo
%div{"data-id" => foo.id}
= foo.name
/ end foo
================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment