Jason Smith
d82a1174d7
Actually ignore comment tags; and correct the expected output in the test case
pirms 16 gadiem
Jason Smith
01272005fe
Refactor template-style builds into a common function
pirms 16 gadiem
Jason Smith
f54312e879
Execute commands properly. You can see what's happening, and errors halt the build
pirms 16 gadiem
Jason Smith
43587531c8
Build CommonJS just like any other target, using "pre" and "post" wrappers
pirms 16 gadiem
Jan Lehnardt
6e4bd7f86b
Clear buffer before rendering. Closes #26 .
pirms 16 gadiem
Jan Lehnardt
328724ad43
whitespace
pirms 16 gadiem
Alexander Lang
c12ba296ab
added testcase for issue #26
pirms 16 gadiem
Jan Lehnardt
4eebb4ba4f
Merge branch 'master' of github.com:janl/mustache.js
* 'master' of github.com:janl/mustache.js:
allow using sections as context. Patch by dpree.
Conflicts:
CHANGES.md
README.md
mustache.js
pirms 16 gadiem
Jan Lehnardt
a6de1a3bdd
add inverted sections. Closes #17 and #24 . Patch by defunkt.
pirms 16 gadiem
Jan Lehnardt
a1d5fcddfa
less line noise
pirms 16 gadiem
Jan Lehnardt
9f0c741c50
whitespace
pirms 16 gadiem
Jan Lehnardt
78f2bd4e39
update
pirms 16 gadiem
Jan Lehnardt
8df3bef014
don't doublt encode entities. Closes #19 . Patch by Leeoniya
pirms 16 gadiem
Jan Lehnardt
2085b5f5a0
allow using sections as context. Patch by dpree.
pirms 16 gadiem
Jan Lehnardt
38ca0cef68
allow using sections as context. Patch by dpree.
pirms 16 gadiem
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.
pirms 16 gadiem
Jan Lehnardt
b76120acb4
Merge remote branch 'defunkt/rake'
* defunkt/rake:
Add descriptions to rake tasks (`rake -T` to see all)
print => puts
pirms 16 gadiem
Jan Lehnardt
c1c18e7c17
start 0.3 branch
pirms 16 gadiem
Chris Wanstrath
4b79a9f594
Add descriptions to rake tasks (`rake -T` to see all)
pirms 16 gadiem
Chris Wanstrath
3a2717e12e
print => puts
pirms 16 gadiem
Jan Lehnardt
ca7956565a
Move commonjs branch into master.
lib/mustache.js is now always kept in sync with mustache.js
(cc @tlrobinson , @boucher )
pirms 16 gadiem
Jan Lehnardt
9eac2ded28
Less ego
pirms 16 gadiem
Jan Lehnardt
6175dc69a6
update CHANGES
pirms 16 gadiem
Jan Lehnardt
ffa4738595
release 0.2.3
pirms 16 gadiem
Jan Lehnardt
20aa13e331
rake ain't make
pirms 16 gadiem
Jan Lehnardt
0b4ea36a9c
thanks will, qoobaa
pirms 16 gadiem
Jan Lehnardt
baeab34a25
less hacky, thanks will
pirms 16 gadiem
Jakub Kuźma
420dd04143
added YUI3 support
pirms 16 gadiem
Jan Lehnardt
4694868fdc
don't barf on undefined partial contexts, return the verbatim partial instead
pirms 16 gadiem
Jan Lehnardt
2c8857e84a
remove extra semicolon
pirms 16 gadiem
Jan Lehnardt
9e2fc30e28
thanks dmathieu, undupe jchris
pirms 16 gadiem
Jan Lehnardt
eaaae4696b
clean up tests
pirms 16 gadiem
Jan Lehnardt
d9ab0b0041
Revert "Parse pragmas only once"
This reverts commit 738de0bcae .
Conflicts:
mustache.js
pirms 16 gadiem
Damien Mathieu
2d574f70dc
add a (failing for now) example of loop inside a partial
pirms 16 gadiem
Jakub Kuźma
5c3a177662
fixed semicolons, added var to 'i' global variable
pirms 16 gadiem
Jan Lehnardt
cb39d246df
throw exception when encountering an unknown pragma
pirms 16 gadiem
Chris Wanstrath
8bb475bf4b
Fix broken link, mention manpages and docs.
pirms 16 gadiem
Jan Lehnardt
5b9a0e5ee9
thanks jchris
pirms 16 gadiem
Jan Lehnardt
272fd0fc1f
fix test case
pirms 16 gadiem
Jan Lehnardt
938f6cf0b6
return!
pirms 16 gadiem
Chris Anderson
a354b55156
more send fun goodness
pirms 16 gadiem
Chris Anderson
f864a27cb9
make the tests also test a generic send function (reveals failures)
pirms 16 gadiem
Jan Lehnardt
3944cfc8cc
Don't join and return the buffer with custom send functions.
pirms 16 gadiem
Jan Lehnardt
17fa3c7b89
typo
pirms 16 gadiem
Jan Lehnardt
2d726ac953
update CHANGES
pirms 16 gadiem
Jan Lehnardt
d0f6845451
document pragmas
pirms 16 gadiem
Jan Lehnardt
03c673b635
whitespace pedantery
pirms 16 gadiem
Jan Lehnardt
a7b3c0b614
add beard competition
pirms 16 gadiem
Jan Lehnardt
738de0bcae
Parse pragmas only once
pirms 16 gadiem
Jan Lehnardt
da2df02ede
Merge commit 'glytch/master'
* commit 'glytch/master':
tests for null value change
don't die on null values
pirms 16 gadiem