cfmljs
Version:
a CFML template engine for node.js
12 lines (9 loc) • 361 B
JavaScript
/* globals require, exports */
// jshint devel:true, curly: false, asi:true, -W084
exports.hasBody = true
exports.tagMatch = /<[\/]?cfsavecontent[^>]*>/gi
exports.render = (tag, vars, renderFn) => {
if (! tag.attributes.variable) throw 'Variable attribute is required'
vars[tag.attributes.variable] = renderFn(tag.parsedBody, vars)
return ''
}