mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 14:00:39 -07:00
fix assign tag regex to include linebreaks in value
This commit is contained in:
@@ -41,6 +41,14 @@ describe('tags/assign', function () {
|
||||
return expect(liquid.parseAndRender(src))
|
||||
.to.eventually.equal('A')
|
||||
})
|
||||
it('should assign as filter across multiple lines as result', function () {
|
||||
const src = `{% assign foo="a b"
|
||||
| capitalize
|
||||
| split: " "
|
||||
| first %}{{foo}}`
|
||||
return expect(liquid.parseAndRender(src))
|
||||
.to.eventually.equal('A')
|
||||
})
|
||||
it('should assign var-1', function () {
|
||||
const src = '{% assign var-1 = 5 %}{{ var-1 }}'
|
||||
return expect(liquid.parseAndRender(src)).to.eventually.equal('5')
|
||||
|
||||
Reference in New Issue
Block a user