Merge branch 'gh-pages' of github.com:wix/react-templates into gh-pages

This commit is contained in:
ido 2014-11-27 18:23:35 +02:00
commit b087470cdc
6 changed files with 10 additions and 2 deletions

View File

@ -63,7 +63,8 @@ function convertText(node, context, txt) {
if (curlyCounter !== 0) {
throw buildError("Failed to parse text '" + txt + "'", context, node);
} else {
res += (first ? '' : '+') + txt.substr(start + 1, end - start - 2);
var needsParens = start !== 0 || end !== txt.length -1;
res += (first ? '' : '+') + (needsParens?'(':'')+txt.substr(start + 1, end - start - 2)+(needsParens?')':'');
first = false;
txt = txt.substr(end);
}

4
test/data/eval.rt Normal file
View File

@ -0,0 +1,4 @@
<!doctype rt>
<div>
Strings and execution mixing is:{2>1?'correct':'incorrect'}
</div>

1
test/data/eval.rt.html Normal file
View File

@ -0,0 +1 @@
<div>Strings and execution mixing is:correct</div>

View File

@ -1,3 +1,4 @@
/*eslint new-cap:0,no-unused-vars:0*/
define([
'react',
'lodash'

View File

@ -1,3 +1,4 @@
/*eslint new-cap:0,no-unused-vars:0*/
define([
'react',
'lodash'

View File

@ -36,7 +36,7 @@ function normalizeHtml(html) {
}
test('html tests', function (t) {
var files = ['scope.rt', 'lambda.rt'];
var files = ['scope.rt', 'lambda.rt','eval.rt'];
t.plan(files.length);
files.forEach(check);