title: Add list of css classes in HTML with Mustache
body: <p>I'm trying to render the HTML attribute <code>class</code> using Mustache. The HTML I'm look to generate is something like:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="single-class"&gt;First item&lt;/li&gt;
      &lt;li class="two classes"&gt;Second item&lt;/li&gt;
      &lt;li&gt;Third item&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>From an array like</p>
  
  <pre><code>array(
      elements =&gt; array(
          array(
              class =&gt; array(single-class), // maybe even just: class =&gt; 'single-class'
              content =&gt; 'First item',
          ),
          array(
              class =&gt; array(two, classes),
              content =&gt; 'Second item',
          ),
          array(
              content =&gt; 'Third item',
          ),
      ),
  );
  </code></pre>
  
  <p>I have tried something like</p>
  
  <pre><code>&lt;li{{#class}} class="{{.}}"{{/class}}&gt;
  </code></pre>
  
  <p>but that will generate several <code>class</code> attributes. I am looking for something more like "if the value exists, join the elements using spaces and put them here".</p>