mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
fix: return variable name in include error
This commit is contained in:
committed by
Jun Yang
parent
6bf242b9fa
commit
93433a8b30
@@ -29,7 +29,7 @@ export default {
|
|||||||
? yield renderer.renderTemplates(liquid.parse(evalQuotedToken(file)), ctx)
|
? yield renderer.renderTemplates(liquid.parse(evalQuotedToken(file)), ctx)
|
||||||
: yield evalToken(file, ctx))
|
: yield evalToken(file, ctx))
|
||||||
: file.getText()
|
: file.getText()
|
||||||
assert(filepath, () => `illegal filename "${file}":"${filepath}"`)
|
assert(filepath, () => `illegal filename "${file.getText()}":"${filepath}"`)
|
||||||
|
|
||||||
const saved = ctx.saveRegister('blocks', 'blockMode')
|
const saved = ctx.saveRegister('blocks', 'blockMode')
|
||||||
ctx.setRegister('blocks', {})
|
ctx.setRegister('blocks', {})
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ describe('tags/include', function () {
|
|||||||
})
|
})
|
||||||
return liquid.renderFile('/parent.html').catch(function (e) {
|
return liquid.renderFile('/parent.html').catch(function (e) {
|
||||||
expect(e.name).to.equal('RenderError')
|
expect(e.name).to.equal('RenderError')
|
||||||
expect(e.message).to.match(/illegal filename/)
|
expect(e.message).to.match(/illegal filename "not-exist"/)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user