liquid
Version:
Node.js port of the Liquid template engine
20 lines (15 loc) • 452 B
JavaScript
const Liquid = require('../../liquid')
module.exports = class Raw extends Liquid.Block {
async parse (tokens) {
if (tokens.length === 0 || this.ended) {
return
}
const token = tokens.shift()
const match = Liquid.Block.FullToken.exec(token.value)
if ((match != null ? match[1] : void 0) === this.blockDelimiter()) {
return this.endTag()
}
this.nodelist.push(token.value)
return this.parse(tokens)
}
}