mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
Support having new line and other whitespace after include filename (#834)
This commit is contained in:
@@ -265,6 +265,14 @@ describe('tags/include', function () {
|
||||
const html = liquid.renderFileSync('/current.html')
|
||||
return expect(html).toBe('FOO-')
|
||||
})
|
||||
it('should support Jekyll style include with other whitespace before filename', function () {
|
||||
mock({
|
||||
'/current.html': '{% include bar/foo.html\r\n\ntitle="TITLE"\tcontent="FOO" %}',
|
||||
'/bar/foo.html': '{{include.title}}={{include.content}}-{{content}}'
|
||||
})
|
||||
const html = liquid.renderFileSync('/current.html')
|
||||
return expect(html).toBe('TITLE=FOO-')
|
||||
})
|
||||
it('should support multiple parameters', function () {
|
||||
mock({
|
||||
'/current.html': '{% include bar/foo.html header="HEADER" content="CONTENT" %}',
|
||||
|
||||
Reference in New Issue
Block a user