Permalink
Browse files

Update demo HTML and fix bug in uneval.js (newlines in strings)

  • Loading branch information...
ashb committed Dec 21, 2008
1 parent ef2ca79 commit 60cecbc14ace338fede301d5b68ba6bb085ed4d5
Showing with 14 additions and 6 deletions.
  1. +13 −5 html/index.html
  2. +1 −1 html/uneval.js
@@ -173,26 +173,34 @@ <h3>What about Jemplate?</h3>
<div class="textarea">
<label for="input">TT Input</label><br/>
<textarea id="input">[% BLOCK wrap -%]
<h1>[% title %]</h1>
&lt;h1>[% title %]&lt;/h1>

<div>
[% content %]
</div>
&lt;div>[% content %]&lt;/div>
[%- END -%]

[% WRAPPER wrap title = get_title() %]
This is [% a %]
[% END %]</textarea>
</div>
<div class="textarea">
<label for="stash">Stash data (JSON)</label><br/>
<textarea id="stash">{a: function() { return location.href }}</textarea>
<textarea id="stash">{a: function() { return location.href },
get_title: function() { return document.title }
}</textarea>
</div>
<div class="submit">
<input type="button" value="Process it" onclick="processIt()" />
</div>
</form>
<script type="text/javascript">if (location.hash == '#run-tests') hideFormAndRunTests(1); </script>
<div id="output"></div>

<h2>A Changelog of sorts</h2>
<ul>
<li>21<sup>st</sup> Dec, 2008
<p>WRAPPER and BLOCK seem to be fully working, and we now pass t/wrapper.t, t/binop.t, t/block.t, t/vars.t and t/varsv1.t</p>
</li>
</ul>
</div>
</body>
</html>
@@ -17,7 +17,7 @@
return '\''
+ o.toString().replace(/[\\\"\']/g, function(m0){
return '\\' + m0;
})
}).replace(/\n/g, '\\n')
+ '\'';
},
'undefined': function(o){ return 'undefined' },

0 comments on commit 60cecbc

Please sign in to comment.