Support having new line and other whitespace after include filename (#834)

This commit is contained in:
Loo Rong Jie
2025-11-11 13:58:12 +08:00
committed by GitHub
parent 8686876067
commit 955b7971c0
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -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" %}',