liquid-node
Version:
Node.js port of Tobias Lütke's Liquid template engine.
19 lines (14 loc) • 460 B
text/coffeescript
Liquid = require "../../liquid"
module.exports = class Raw extends Liquid.Block
parse: (tokens) ->
or= []
.pop() while .length > 0
while tokens.length > 0
token = tokens.shift()
match = Liquid.Block.FullToken.exec(token)
if match and is match[1]
break
else if token.length > 0
.push(token)
Liquid.Template.registerTag "raw", Raw