title: Escaping if/else in Jade template
body: <p>So I have a simply block of html in my jade template with a loop:</p>
  
  <pre><code>  each dude, i in dudes
      div(class='someClass')
        div.otherStuff
          span.someContent #{name}
  </code></pre>
  
  <p>I want to apply a data attribute to my top most div when a certain looping condition is met, in this case the first dude, I set it up like this</p>
  
  <pre><code>  each dude, i in dudes
       if i == 0
         div(class='someClass, data-someAttr='first dude')
       else
         div(class='someClass')
            div.otherstuff
              span.someContent
  </code></pre>
  
  <p>Setup like this it causes the <code>div.otherStuff div</code> and the <code>span.someContent</code> to only display on the else condition.  I've moved the tab spaces around on those items but I can't get it escape that else and give the <code>div.otherStuff</code> and <code>span.someContent</code> to both the first dude and the subsequent dudes after that.  I've also tried setting that data attr to a variable and trying to apply it that way but without any success.</p>
  
  <p>What I end up doing to get around it is this:</p>
  
  <pre><code>  each dude, i in dudes
       if i == 0
         div(class='someClass, data-someAttr='first dude')
            div.otherstuff
            span.someContent
       else
         div(class='someClass')
            div.otherstuff
              span.someContent
  </code></pre>
  
  <p>How do I escape that <code>if/else</code> so I dont have to duplicate the <code>div.otherStuff</code> and <code>span.someContent</code>?</p>