title: Reveal.js: Add fragments inside code
body: <p>I've got a presentation running with reveal.js and everything is working. I am writing some sample code and highlight.js is working well within my presentation. But, I want to incrementally display code. E.g., imagine that I'm explaining a function to you, and I show you the first step, and then want to show the subsequent steps. Normally, I would use fragments to incrementally display items, but it's not working in a code block.</p>
  
  <p>So I have something like this:</p>
  
  <pre><code>&lt;pre&gt;&lt;code&gt;
  def python_function()
      &lt;span class="fragment"&gt;display this first&lt;/span&gt;
      &lt;span class="fragment"&gt;now display this&lt;/span&gt;
  &lt;/code&gt;&lt;/pre&gt;
  </code></pre>
  
  <p>But the <code>&lt;span&gt;</code> elements are getting syntax-highlighted instead of read as HTML fragments. It looks something like this: <a href="http://imgur.com/nK3yNIS">http://imgur.com/nK3yNIS</a></p>
  
  <p>FYI without the <code>&lt;span&gt;</code> elements highlight.js reads this correctly as python, but with the <code>&lt;span&gt;</code>, the language it detects is coffeescript.</p>
  
  <p>Any ideas on how to have fragments inside a code block (or another way to simulate this) would be greatly appreciated.</p>