Brandon Payton
55c4346656
Add missing comma to dot_notation test's object literal.
14 jaren geleden
brandonpayton
18a0e89640
Fix for dot notation returning a value of boolean true for kinda_truthy values '0' and 'false'.
14 jaren geleden
Brandon Payton
26e8ebe138
Replace tabs with 2 spaces.
14 jaren geleden
John Butler
a6f913a92a
it would be handy if I committed the tests!
14 jaren geleden
John Butler
3ffc6b2828
adding simple test for dot notation support
14 jaren geleden
Jan Lehnardt
1dabeabfd6
add example for section names with question marks
15 jaren geleden
Ben Cherry
3ebd5ef1b3
remove i18n stuff
15 jaren geleden
Ben Cherry
033bdd9f79
updated i18n test
15 jaren geleden
Ben Cherry
373e263973
moved new tests into new examples/* files
15 jaren geleden
Ben Cherry
b15c6fb842
tests for brokenness, now in Rhino too
15 jaren geleden
Ben Cherry
d5e54b409a
works with empty sections
15 jaren geleden
Jan Lehnardt
29de9bacf5
add nexting example
15 jaren geleden
Ben Cherry
5dc7c74e9b
failing tests
15 jaren geleden
Jan Lehnardt
60caed99f8
Escape single quotes to be HTML5 compliant.
HTML tag attributes in HTML5 can use single quotes (') as delimiters.
Patch by Tom Lynn.
15 jaren geleden
Jan Lehnardt
e4ab54d524
better whitspacing, closes #41
16 jaren geleden
Jan Lehnardt
5c08642838
Make IMPLICIT ITERATORS a first class feature.
Closes #39 .
16 jaren geleden
Jan Lehnardt
1f0ca2fe50
Add test case for recursive partial. If it weren't for complex.html
it could be neat and there'd be s/kids/children/ — Oh well.
16 jaren geleden
endor
dd19083d5f
tests for partial recursion
16 jaren geleden
Jan Lehnardt
885501df7d
Add test case to close #11 . No bugfix necessary.
16 jaren geleden
Aaron Gibralter
53e9b2692b
Partials within list sections did not seem to be functioning
correctly. Since a list section pushes a sub-object of the
"view" into the "current" context, a partial should recognize
this altered context. The one-line change in mustache.js does
exactly this.
Closes #35 .
16 jaren geleden
Aaron Gibralter
e25eeaebb8
Allow arbitrary whitespace within tags. Closes #34 .
16 jaren geleden
Jan Lehnardt
595f3fbf35
Revert "Merge remote branch 'rbriank/master'"
This reverts commit c2f886602af6ff2d6790b33f87445fc2a5677e0e, reversing
changes made to 88d3d9cf32 .
16 jaren geleden
Jan Lehnardt
73b463a30e
Revert "fix expected output"
This reverts commit f1f55138a4 .
16 jaren geleden
Jan Lehnardt
f1f55138a4
fix expected output
16 jaren geleden
Jason Smith
bc447d8722
Actually ignore comment tags; and correct the expected output in the test case
16 jaren geleden
Jason Smith
d82a1174d7
Actually ignore comment tags; and correct the expected output in the test case
16 jaren geleden
Jan Lehnardt
a6de1a3bdd
add inverted sections. Closes #17 and #24 . Patch by defunkt.
16 jaren geleden
Jan Lehnardt
8df3bef014
don't doublt encode entities. Closes #19 . Patch by Leeoniya
16 jaren geleden
Jan Lehnardt
2085b5f5a0
allow using sections as context. Patch by dpree.
16 jaren geleden
Chris Wanstrath
e2e8f16845
Higher Order Sections
If a section key returns a function, it will be called
and passed both the unrendered block of text and a renderer
convenience function.
Given this JS:
"name": "Tater",
"bolder": function() {
return function(text, render) {
return "<b>" + render(text) + '</b>'
}
}
And this template:
{{#bolder}}Hi {{name}}.{{/bolder}}
We'll get this output:
<b>Hi Tater.</b>
As you can see, we're pre-processing the text in the block.
This can be used to implement caching, filters (like syntax
highlighting), etc.
You can use `this.name` to access the attribute `name` from
your view.
16 jaren geleden
Brian Kierstead
7198e2c578
simple iterator adding \n bug
16 jaren geleden
Jan Lehnardt
4694868fdc
don't barf on undefined partial contexts, return the verbatim partial instead
16 jaren geleden
Jan Lehnardt
eaaae4696b
clean up tests
16 jaren geleden
Damien Mathieu
2d574f70dc
add a (failing for now) example of loop inside a partial
16 jaren geleden
Jan Lehnardt
cb39d246df
throw exception when encountering an unknown pragma
16 jaren geleden
Elise Wood
6324de20c6
tests for null value change
16 jaren geleden
Jan Lehnardt
88ddf16cec
allow tag-free templates. Closes http://github.com/janl/mustache.js/issues#issue/9
16 jaren geleden
Jan Lehnardt
17630842a1
add pragma options, rename pragma according to mustache
16 jaren geleden
Jan Lehnardt
d0d46e52aa
make mustache streaming
16 jaren geleden
Jan Lehnardt
ec18e0eff4
spaces, not tabs
16 jaren geleden
Jan Lehnardt
0bb4776def
mustache compat: Don't barf on unknown variables.
16 jaren geleden
Jan Lehnardt
b579404912
s/ENABLE-STRING-ARRAYS/JSTACHE-ENABLE-STRING-ARRAYS/
16 jaren geleden
Jan Lehnardt
1fa8421678
make strings of arrays a pragma option, introduce {{%PRAGMA}} tag to enable features
16 jaren geleden
Jan Lehnardt
176b0111fe
ctemplate / mustache compat: partials now use >, not <
16 jaren geleden
Paul J. Davis
895e741234
Fix error message consistency.
16 jaren geleden
Paul J. Davis
3a9eda10b4
Avoid requiring partials in global scope.
16 jaren geleden
Chris Williams
a096578f99
Fixing trailing white space sensitivity for reusable enumerable spec.
16 jaren geleden
Chris Williams
68830cadff
Updated the render_segment to allow for the same variable to be reused for multiple template segments. Added a map function that can be used if not available on array natively - ahem IE ahem
16 jaren geleden
Sebastian Cohnen
45948113fa
Fixed changing the delimiter
Changing the delimiter and use the new one on the
same line was broken. Fixed that and extended the
test suite.
16 jaren geleden
Sebastian Cohnen
c8c378c4f5
Rewritten render_tags, added test for two placeholder in one row
16 jaren geleden