Jan Lehnardt
6e4bd7f86b
Clear buffer before rendering. Closes #26 .
16 лет назад
Jan Lehnardt
a6de1a3bdd
add inverted sections. Closes #17 and #24 . Patch by defunkt.
16 лет назад
Jan Lehnardt
a1d5fcddfa
less line noise
16 лет назад
Jan Lehnardt
8df3bef014
don't doublt encode entities. Closes #19 . Patch by Leeoniya
16 лет назад
Jan Lehnardt
2085b5f5a0
allow using sections as context. Patch by dpree.
16 лет назад
Jan Lehnardt
38ca0cef68
allow using sections as context. Patch by dpree.
16 лет назад
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 лет назад
Jan Lehnardt
c1c18e7c17
start 0.3 branch
16 лет назад
Jan Lehnardt
9eac2ded28
Less ego
16 лет назад
Jan Lehnardt
ffa4738595
release 0.2.3
16 лет назад
Jan Lehnardt
4694868fdc
don't barf on undefined partial contexts, return the verbatim partial instead
16 лет назад
Jan Lehnardt
d9ab0b0041
Revert "Parse pragmas only once"
This reverts commit 738de0bcae .
Conflicts:
mustache.js
16 лет назад
Jakub Kuźma
5c3a177662
fixed semicolons, added var to 'i' global variable
16 лет назад
Jan Lehnardt
cb39d246df
throw exception when encountering an unknown pragma
16 лет назад
Jan Lehnardt
272fd0fc1f
fix test case
16 лет назад
Jan Lehnardt
938f6cf0b6
return!
16 лет назад
Jan Lehnardt
3944cfc8cc
Don't join and return the buffer with custom send functions.
16 лет назад
Jan Lehnardt
17fa3c7b89
typo
16 лет назад
Jan Lehnardt
738de0bcae
Parse pragmas only once
16 лет назад
Elise Wood
6324de20c6
tests for null value change
16 лет назад
Elise Wood
9cc393b328
don't die on null values
16 лет назад
Elise Wood
6d6218b713
don't die on null values
16 лет назад
Jan Lehnardt
dae2c7af49
More explicit error message: Tell which parital is unknown.
16 лет назад
Jan Lehnardt
195fa9e255
Better isArray implementation via
62efd014fc (comments)
Thanks Nikita!
16 лет назад
Jan Lehnardt
62efd014fc
more robust type detection, thanks again Doug
16 лет назад
Jan Lehnardt
70fdf9f2a0
roll 0.2.2
16 лет назад
Jan Lehnardt
88ddf16cec
allow tag-free templates. Closes http://github.com/janl/mustache.js/issues#issue/9
16 лет назад
Jan Lehnardt
2ff0ce7767
whitespace
16 лет назад
Jan Lehnardt
bb581c4356
style
16 лет назад
Jan Lehnardt
6ff7cd470c
better regex
16 лет назад
Jan Lehnardt
17630842a1
add pragma options, rename pragma according to mustache
16 лет назад
Jan Lehnardt
95509c585b
add docs for the streaming API
16 лет назад
Jan Lehnardt
d0d46e52aa
make mustache streaming
16 лет назад
Jan Lehnardt
dd508d0385
whitespace
16 лет назад
Jan Lehnardt
c5121ffe6c
bump version. welcome 0.2
16 лет назад
Jan Lehnardt
0bb4776def
mustache compat: Don't barf on unknown variables.
16 лет назад
Jan Lehnardt
b579404912
s/ENABLE-STRING-ARRAYS/JSTACHE-ENABLE-STRING-ARRAYS/
16 лет назад
Jan Lehnardt
1fa8421678
make strings of arrays a pragma option, introduce {{%PRAGMA}} tag to enable features
16 лет назад
Jan Lehnardt
26dcea4079
spaces, not tabs
16 лет назад
Jan Lehnardt
176b0111fe
ctemplate / mustache compat: partials now use >, not <
16 лет назад
Jan Lehnardt
01b2620aaa
manual cherry-pick for 9b27b2272c
16 лет назад
Paul J. Davis
895e741234
Fix error message consistency.
16 лет назад
Paul J. Davis
3a9eda10b4
Avoid requiring partials in global scope.
16 лет назад
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 лет назад
Jan Lehnardt
638094e9ae
whitespace & reorder
16 лет назад
tlrobinson
1edff65960
Added missing "var"s
16 лет назад
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 лет назад
Sebastian Cohnen
c8c378c4f5
Rewritten render_tags, added test for two placeholder in one row
16 лет назад
Alexander Lang
093a5b84da
fixed bug where recursion overwrote data in the parent context
16 лет назад
Alexander Lang
697bca307a
fixed bug where mustache had access to data from previous runs
16 лет назад