Jade の attributes と block

これ知らんかった
そしてめっちゃ知りたかった

mixin hoge(link)
  a.hoge(href=link)&attributes(attributes)
    if block
      block

+hoge("http://example.org/").fuga hello

// => <a href="http://example.org/" class="hoge fuga">hello</a>

こういうのできるの捗る

mixin void-link()
  a(href="javascript:void(0);")&attributes(attributes)
    if block
      block

mixin modal()
  .modal&attributes(attributes)
    if block
      block

+modal
  h1 タイトル
  p ほげー
  +void-link.close-button 閉じる