title: Best way to handle data attributes in Slim
body: <p>I was evaluating <strong>Slim</strong> as a replacement for <strong>HAML</strong> in a personal project, and it doesn't appear to handle HTML5 data attributes as gracefully as HAML. I was hoping someone may have also run into this, or may have known about an option/syntax I haven't yet found in their docs.</p>
  
  <p>HAML allows you to define <a href="http://haml.info/docs/yardoc/file.REFERENCE.html#html5_custom_data_attributes">HTML 5 data attributes</a> simply by using nested hashes like so: </p>
  
  <p><code>%a{data: {key1: 'val', key2: 'val'}}</code></p>
  
  <p>resulting in</p>
  
  <p><code>&lt;a data-key1='val' data-key2='val'&gt;&lt;/a&gt;</code></p>