raymond.lam
efdeb55202
Add tags parameter to .render()
7 лет назад
raymond.lam
78458488a4
Reintroduce pull requests #643 and #664, and update description for
parse method
7 лет назад
Raymond Lam
5acafd33c6
Fix custom tags by rolling back #643 & #664 ( #670 )
Pull requests #643 and #664 together fix the issue reported in issue #617, but the change in behavior is causing semvers concerns. See issue #669 . Therefore, roll back #643 and #664 and later reintroduce in next planned major release (v3.0).
Fixes #669
7 лет назад
Ashinoko
28ca619a24
fix bug: cache actually not working ( #664 )
Resolve issue #663 and add test.
7 лет назад
raymond.lam
198a5657be
fix typo in parse-caching/Mustache.tags test
8 лет назад
raymond.lam
24653984d0
Writer.prototype.parse to cache by tags in addition to template string
9 лет назад
kookookchoozeus
329bfd090d
Fixes CLI tests for windows ( #560 )
* Fixes CLI tests for windows
* Hijacked exec so we don't have to wrap each command in changeForOS, and made replacing 'cat' safer with word boundaries
* Fixing changed tests to be more consistent with the code base
10 лет назад
David da Silva
7e83df9b05
Assert `null` value render
It was not being asserted anywhere else, and I was suspecting that
PR #552 was changing current (and correct) behaviour.
10 лет назад
David da Silva
5e19b3049b
Add consistent indentation in null_lookup_object.js test file
Either vim or git was going crazy with the indentation when I tried
improving the test via changing one of the lines, so I linted it all
together.
10 лет назад
wizawu
c71fc6ff6b
Remove test/_files/cli_output.txt
10 лет назад
wizawu
3165c53f7f
Add test case for `output` argument
10 лет назад
Phillip Johnsen
378bcca8a5
Improve HTML escaping.
This closes a couple of potential exploit scenarios.
Backtick (`) for older IEs and equals (=) for unquoted attributes.
Refs 83b8e846a3
Closes https://github.com/janl/mustache.js/pull/388
10 лет назад
palkan
d0cf9c65ee
[ Fix #483 ] Add partials support to cli
10 лет назад
Phillip Johnsen
2ef7356ec2
Equal error message test in .render() for server and browser.
This fixes a small blooper introduced in a3f4339 .
Error message thrown for invalid template type, should be equal on
the server and in the browser.
10 лет назад
Phillip Johnsen
a3f4339c65
Throw error when providing .render() with invalid template type.
As we require the template to be a `string` we now throw an error when given
any other data type. This should provide the developers with a meaningful
error rather than a cryptic TypeError from the murky depths of our source code.
Fixes #464
11 лет назад
Phillip Johnsen
8adacd1641
Bugfix for null/undefined when using dot notation
11 лет назад
David da Silva
931f49b5da
improve test with undefined/null lookup hit using dot notation
11 лет назад
Phillip Johnsen
fc6d73b353
Bugfix for using values from view's context prototype.
Fixes #445
11 лет назад
Phillip Johnsen
e801e842a7
Bugfix for view context cache picking methods from Object.prototype instead of the view.
Fixes #442
11 лет назад
David da Silva
954a8fbf15
use chai for improved string diffing
11 лет назад
Phillip Johnsen
b2fb42e572
Improve CLI parsing error
11 лет назад
Phillip Johnsen
b473d19cae
Added browser tests.
Covers the project with browser tests, not only V8 via node/iojs. Tests are runned with [zuul](https://github.com/defunctzombie/zuul ) which
provides simple local browser testing, aswell as cloud testing on multiple browsers with [saucelabs](http://saucelabs.com ).
11 лет назад
Phillip Johnsen
32935dc09b
Bugfix for number rendered as [object Object]
+ minor fix for better error message when running specific render test
Fixes #415
11 лет назад
Phillip Johnsen
26a4e95e3b
CLI: -v option for displaying current version
Fixes #431
11 лет назад
David da Silva
a0204307c6
fixing null and undefined lookup, fixes #390, #397, #409
11 лет назад
Phillip Johnsen
65387a5468
Created command line tool.
CLI used to render a mustache template with a data view, writes the template into stdout when successfull. Otherwise meaningfull errors into stderr.
Fixes #424
11 лет назад
Chris Buckley
d9aa703014
Only access properties of objects on Context.lookup
12 лет назад
Lakshan Perera
42ec324c8f
When rendering partials, pass the partial template instead of the original template.
12 лет назад
Michael Jackson
c4b345f14c
Smaller API surface area
Removed cache* functions altogether. mustache.parse is all that's
really needed.
12 лет назад
Michael Jackson
b114120741
Major reorganization and cleanup
12 лет назад
Michael Jackson
da16eada83
Allow a string to act as context
Fixes #321
12 лет назад
Michael Jackson
411edae061
Fix [object Object] errors
Fixes #322
Fixes #330
Fixes #331
Fixes #334
12 лет назад
Michael Jackson
257c235661
Add back mustache/spec submodule
12 лет назад
Michael Jackson
207b76a880
Fix some Rake tasks, cleanup Rakefile
12 лет назад
Daniel Fagerstrom
3ee2574e21
Used fs.existsSync that doesn't exists in nodejs 0.6 that is used by travis for testing.
13 лет назад
Daniel Fagerstrom
c8005af7c3
Test that use all tests from Mustache specifications. The ones that fails in current mustache.js are skiped to not break the build.
13 лет назад
Daniel Fagerstrom
5e58358574
Include submodule for Mustache specifications.
13 лет назад
Michael Jackson
af935e3441
Simplify test
13 лет назад
Michael Jackson
eb6ceb8b14
Fixed rendering error when using nested higher-order sections
Fixes #274
13 лет назад
Michael Jackson
b9701d58f5
Add failing test for nested higher-order sections
13 лет назад
Michael Jackson
eee8d695fc
Better error reporting
13 лет назад
Michael Jackson
3fea961f06
Use mocha for testing
13 лет назад
Michael Jackson
e0edb356ae
Fail gracefully on empty template
Fixes #267
13 лет назад
Matt Sacks
d59f02f622
Don't evaluate lambdas that return falsy values as an empty string.
Issue: If I create a Mustache lambda to return numbers and I expect 0 to be of
those numbers, I'll instead only receive an empty string for 0 because it
evaluates to falsy.
Fix: Check the result of the lambda to be undefined or null. Only then should
it return the empty string.
13 лет назад
Michael Jackson
26dfacd8be
Add Mustache.compileTokens
Fixes #258
13 лет назад
Michael Jackson
85014a4f6c
Add spec for partial caching issue
13 лет назад
Michael Jackson
afc6e0f1b1
Changed wording of some specs
13 лет назад
Michael Jackson
0ea95746a8
Allow auto-loading of partials
Fixes #247
13 лет назад
Michael Jackson
a5dbb708d7
Fix text token offsets
Text tokens now accurately reflect their content's exact position
in the original template.
13 лет назад
Michael Jackson
0a6d71ca90
Add tests for null view
13 лет назад