Skip to content

Commit

Permalink
missing context-map in partials.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelangelo Jong committed Jan 10, 2017
1 parent faedd56 commit 2225879
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 13 deletions.
4 changes: 3 additions & 1 deletion benchmark/bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3716,6 +3716,8 @@ function renderPartial(bars, struct, context) {
);
}

context = context.contextWithVars(makeVars(context, struct.map, bars));

return renderChildrenNodes(bars, partial.fragment, context);
}

Expand Down Expand Up @@ -6697,7 +6699,7 @@ function isArray(obj) {
},{}],91:[function(require,module,exports){
module.exports={
"name": "bars",
"version": "0.5.3",
"version": "0.6.1",
"description": "Bars is a lightweight high performance HTML aware templating engine.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion demo/bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3716,6 +3716,8 @@ function renderPartial(bars, struct, context) {
);
}

context = context.contextWithVars(makeVars(context, struct.map, bars));

return renderChildrenNodes(bars, partial.fragment, context);
}

Expand Down Expand Up @@ -6697,7 +6699,7 @@ function isArray(obj) {
},{}],91:[function(require,module,exports){
module.exports={
"name": "bars",
"version": "0.5.3",
"version": "0.6.1",
"description": "Bars is a lightweight high performance HTML aware templating engine.",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<head>
<title>Bars Demo</title>
<script id="bars-template-title-u" type="text/x-handlebars-template">
<span>{{@upperCase(title)}}</span>
<span>{{@upperCase(tt)}}</span>
</script>
<script id="bars-template-title-l" type="text/x-handlebars-template">
<span>{{@lowerCase(title)}}</span>
<span>{{@lowerCase(tt)}}</span>
</script>
<script id="bars-template" type="text/x-handlebars-template">
<ul>
Expand All @@ -27,7 +27,7 @@
{{/with}}
<br>
<br>
{{>? t }}
{{>? t tt = title}}
</script>
<script src="bars.js"></script>
</head>
Expand Down
2 changes: 2 additions & 0 deletions lib/render/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ function renderPartial(bars, struct, context) {
);
}

context = context.contextWithVars(makeVars(context, struct.map, bars));

return renderChildrenNodes(bars, partial.fragment, context);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bars",
"version": "0.6.0",
"version": "0.6.1",
"description": "Bars is a lightweight high performance HTML aware templating engine.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/bars-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,8 @@ function renderPartial(bars, struct, context) {
);
}

context = context.contextWithVars(makeVars(context, struct.map, bars));

return renderChildrenNodes(bars, partial.fragment, context);
}

Expand Down Expand Up @@ -4410,7 +4412,7 @@ function isArray(obj) {
},{}],65:[function(require,module,exports){
module.exports={
"name": "bars",
"version": "0.5.3",
"version": "0.6.1",
"description": "Bars is a lightweight high performance HTML aware templating engine.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/bars-runtime.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3716,6 +3716,8 @@ function renderPartial(bars, struct, context) {
);
}

context = context.contextWithVars(makeVars(context, struct.map, bars));

return renderChildrenNodes(bars, partial.fragment, context);
}

Expand Down Expand Up @@ -6697,7 +6699,7 @@ function isArray(obj) {
},{}],91:[function(require,module,exports){
module.exports={
"name": "bars",
"version": "0.5.3",
"version": "0.6.1",
"description": "Bars is a lightweight high performance HTML aware templating engine.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/bars.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion test/bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3716,6 +3716,8 @@ function renderPartial(bars, struct, context) {
);
}

context = context.contextWithVars(makeVars(context, struct.map, bars));

return renderChildrenNodes(bars, partial.fragment, context);
}

Expand Down Expand Up @@ -6697,7 +6699,7 @@ function isArray(obj) {
},{}],91:[function(require,module,exports){
module.exports={
"name": "bars",
"version": "0.5.3",
"version": "0.6.1",
"description": "Bars is a lightweight high performance HTML aware templating engine.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2225879

Please sign in to comment.