mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
fix: allow quoted variable name in capture, fixes #252
This commit is contained in:
@@ -10,4 +10,12 @@ describe('Issues', function () {
|
||||
const html = engine.parseAndRenderSync('{{huh | truncate: 11}}', { huh: 'fdsafdsafdsafdsaaaaa' })
|
||||
expect(html).to.equal('fdsafdsa...')
|
||||
})
|
||||
it('#252 "Not valid identifier" error for a quotes-containing identifier', async () => {
|
||||
const template = `{% capture "form_classes" -%}
|
||||
foo
|
||||
{%- endcapture %}{{form_classes}}`
|
||||
const engine = new Liquid()
|
||||
const html = await engine.parseAndRender(template)
|
||||
expect(html).to.equal('foo')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user