Mustache JS Templating - How do I embed a variable in a script tag string?
I just started using Mustache and I like it so far, but this has me perplexed. I am using the GitHub gist API to pull down my gists, and part of what I want to do is include the embedding functionality into my page. The problem is Mustache seems to not want to have anything to do with my dynamic script tag. For example, this works fine: <div class="gist-detail"> {{id}} <!-- This produces a valid Gist ID --> </div> Additionally, this works perfect: <div class="gist-detail"> <script src='http://gist.github.com/1.js'></script> <!-- Produces the correct embed markup with Gist ID #1 --> </div> If I