Sahab Yazdani
45955f5dc1
Fixes issue 105
15 anos atrás
Jan Lehnardt
e72b635ca1
one quote will do
15 anos atrás
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 anos atrás
Jan Lehnardt
d8f25f82bd
escape " as ". Closes #58
15 anos atrás
Jan Lehnardt
286b2dc78a
next is 0.3.1
16 anos atrás
Jan Lehnardt
8e3444ab9d
roll 0.3.0
16 anos atrás
Jan Lehnardt
e4ab54d524
better whitspacing, closes #41
16 anos atrás
Jan Lehnardt
1ddda5c5f8
Allow empty-string partials.
Closes #40 .
16 anos atrás
Jan Lehnardt
5c08642838
Make IMPLICIT ITERATORS a first class feature.
Closes #39 .
16 anos atrás
Jan Lehnardt
0b10ab0db8
Regex: \w includes "_". Thanks Leeoniya.
16 anos atrás
Jan Lehnardt
e33d4f8bf8
whitespacin'
16 anos atrás
Jan Lehnardt
e3911963f3
JSLint hurt my feelings.
16 anos atrás
Jan Lehnardt
2bab7be637
Less code per line, fix Rhino compat.
16 anos atrás
Jan Lehnardt
3abfafa553
Fix typo in comment. #pedantry
16 anos atrás
Jan Lehnardt
4466a47561
whoopsiedupecode
16 anos atrás
Jan Lehnardt
1e7fce2e7a
Remove expensive merge() method. Context lookups for nested sections
and partials are now performed on the current context and the top-
level view object. This avoids a ton of copying and duplication of
view objects and contexts.
16 anos atrás
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 anos atrás
Aaron Gibralter
e25eeaebb8
Allow arbitrary whitespace within tags. Closes #34 .
16 anos atrás
Jason Smith
c5a114bf88
Reset the buffer only for new renderings, not e.g. partials
16 anos atrás
Jason Smith
bc447d8722
Actually ignore comment tags; and correct the expected output in the test case
16 anos atrás
Jason Smith
d82a1174d7
Actually ignore comment tags; and correct the expected output in the test case
16 anos atrás
Jan Lehnardt
6e4bd7f86b
Clear buffer before rendering. Closes #26 .
16 anos atrás
Jan Lehnardt
a6de1a3bdd
add inverted sections. Closes #17 and #24 . Patch by defunkt.
16 anos atrás
Jan Lehnardt
a1d5fcddfa
less line noise
16 anos atrás
Jan Lehnardt
8df3bef014
don't doublt encode entities. Closes #19 . Patch by Leeoniya
16 anos atrás
Jan Lehnardt
2085b5f5a0
allow using sections as context. Patch by dpree.
16 anos atrás
Jan Lehnardt
38ca0cef68
allow using sections as context. Patch by dpree.
16 anos atrás
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 anos atrás
Jan Lehnardt
c1c18e7c17
start 0.3 branch
16 anos atrás
Jan Lehnardt
9eac2ded28
Less ego
16 anos atrás
Jan Lehnardt
ffa4738595
release 0.2.3
16 anos atrás
Jan Lehnardt
4694868fdc
don't barf on undefined partial contexts, return the verbatim partial instead
16 anos atrás
Jan Lehnardt
d9ab0b0041
Revert "Parse pragmas only once"
This reverts commit 738de0bcae .
Conflicts:
mustache.js
16 anos atrás
Jakub Kuźma
5c3a177662
fixed semicolons, added var to 'i' global variable
16 anos atrás
Jan Lehnardt
cb39d246df
throw exception when encountering an unknown pragma
16 anos atrás
Jan Lehnardt
272fd0fc1f
fix test case
16 anos atrás
Jan Lehnardt
938f6cf0b6
return!
16 anos atrás
Jan Lehnardt
3944cfc8cc
Don't join and return the buffer with custom send functions.
16 anos atrás
Jan Lehnardt
17fa3c7b89
typo
16 anos atrás
Jan Lehnardt
738de0bcae
Parse pragmas only once
16 anos atrás
Elise Wood
6324de20c6
tests for null value change
16 anos atrás
Elise Wood
9cc393b328
don't die on null values
16 anos atrás
Elise Wood
6d6218b713
don't die on null values
16 anos atrás
Jan Lehnardt
dae2c7af49
More explicit error message: Tell which parital is unknown.
16 anos atrás
Jan Lehnardt
195fa9e255
Better isArray implementation via
62efd014fc (comments)
Thanks Nikita!
16 anos atrás
Jan Lehnardt
62efd014fc
more robust type detection, thanks again Doug
16 anos atrás
Jan Lehnardt
70fdf9f2a0
roll 0.2.2
16 anos atrás
Jan Lehnardt
88ddf16cec
allow tag-free templates. Closes http://github.com/janl/mustache.js/issues#issue/9
16 anos atrás
Jan Lehnardt
2ff0ce7767
whitespace
16 anos atrás
Jan Lehnardt
bb581c4356
style
16 anos atrás