mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
fix include scope.blocks bleeding
This commit is contained in:
+7
-3
@@ -147,13 +147,17 @@ function matchRightBracket(str, begin) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
exports.factory = function(_ctx, opts) {
|
||||
exports.factory = function(ctx, opts) {
|
||||
opts = _.assign({
|
||||
strict: false
|
||||
strict: false,
|
||||
blocks: {}
|
||||
}, opts);
|
||||
ctx = _.assign(ctx, {
|
||||
liquid: opts
|
||||
});
|
||||
|
||||
var scope = Object.create(Scope);
|
||||
scope.opts = opts;
|
||||
scope.scopes = [_ctx || {}];
|
||||
scope.scopes = [ctx];
|
||||
return scope;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user