fix: break/continue omitting output before them, #123

BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
This commit is contained in:
harttle
2019-08-26 10:15:43 -05:00
committed by Jun Yang
parent 854e12ba53
commit ae45c4622e
99 changed files with 373 additions and 407 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
import { parseExp } from '../render/syntax'
import { FilterArgs, Filter } from './filter/filter'
import Context from '../context/context'
import { Context } from '../context/context'
export default class Value {
export class Value {
private strictFilters: boolean
private initial: string
private filters: Filter[] = []
@@ -47,10 +47,10 @@ export default class Value {
}
this.filters.push(new Filter(name, args, this.strictFilters))
}
public async value (ctx: Context) {
let val = await parseExp(this.initial, ctx)
public value (ctx: Context) {
let val = parseExp(this.initial, ctx)
for (const filter of this.filters) {
val = await filter.render(val, ctx)
val = filter.render(val, ctx)
}
return val
}