mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
Merge branch 'gh-pages' of github.com:wix/react-templates into gh-pages
This commit is contained in:
commit
b087470cdc
@ -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
4
test/data/eval.rt
Normal 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
1
test/data/eval.rt.html
Normal file
@ -0,0 +1 @@
|
||||
<div>Strings and execution mixing is:correct</div>
|
@ -1,3 +1,4 @@
|
||||
/*eslint new-cap:0,no-unused-vars:0*/
|
||||
define([
|
||||
'react',
|
||||
'lodash'
|
||||
|
@ -1,3 +1,4 @@
|
||||
/*eslint new-cap:0,no-unused-vars:0*/
|
||||
define([
|
||||
'react',
|
||||
'lodash'
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user