mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
fix: allow {%render%} to reassign argument, #404
This commit is contained in:
committed by
Harttle
parent
432d1c7ccb
commit
124f4c4485
@@ -6,9 +6,21 @@ import { isArray, isNil, isString, isFunction, toLiquid } from '../util/undersco
|
||||
import { InternalUndefinedVariableError } from '../util/error'
|
||||
|
||||
export class Context {
|
||||
/**
|
||||
* insert a Context-level empty scope,
|
||||
* for tags like {% capture %} {% assign %} to operate
|
||||
*/
|
||||
private scopes: Scope[] = [{}]
|
||||
private registers = {}
|
||||
/**
|
||||
* user passed in scope
|
||||
* {% increment %}, {% decrement %} changes this scope,
|
||||
* whereas {% capture %}, {% assign %} only hide this scope
|
||||
*/
|
||||
public environments: Scope
|
||||
/**
|
||||
* global scope used as fallback for missing variables
|
||||
*/
|
||||
public globals: Scope
|
||||
public sync: boolean
|
||||
public opts: NormalizedFullOptions
|
||||
|
||||
Reference in New Issue
Block a user