mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 04:40:39 -07:00
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:
@@ -1,14 +1,16 @@
|
||||
import Template from '../template/template'
|
||||
import ITemplate from '../template/itemplate'
|
||||
import HTMLToken from '../parser/html-token'
|
||||
import { Template } from '../template/template'
|
||||
import { ITemplate } from '../template/itemplate'
|
||||
import { HTMLToken } from '../parser/html-token'
|
||||
import { Context } from '../context/context'
|
||||
import { Emitter } from '../render/emitter'
|
||||
|
||||
export default class extends Template<HTMLToken> implements ITemplate {
|
||||
export class HTML extends Template<HTMLToken> implements ITemplate {
|
||||
private str: string
|
||||
public constructor (token: HTMLToken) {
|
||||
super(token)
|
||||
this.str = token.value
|
||||
}
|
||||
public async render (): Promise<string> {
|
||||
return this.str
|
||||
public render (ctx: Context, emitter: Emitter) {
|
||||
emitter.write(this.str)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user