fix: allow quotes in inline comment tag, fixes #628

This commit is contained in:
Jun Yang
2023-07-07 22:48:55 +08:00
committed by GitHub
parent c0bc2de76e
commit bf425c3adb
5 changed files with 38 additions and 12 deletions
@@ -17,6 +17,16 @@ describe('tags/inline-comment', function () {
const html = await liquid.parseAndRender(src)
return expect(html).toBe('foo')
})
it('should allow single quotes', async function () {
const src = "B{% # that's %}A"
const html = await liquid.parseAndRender(src)
return expect(html).toBe('BA')
})
it('should allow double quotes', async function () {
const src = 'B{% # that"s %}A'
const html = await liquid.parseAndRender(src)
return expect(html).toBe('BA')
})
it('should handle hash without trailing whitespace', async function () {
const src = '{% #some comment %}'
const html = await liquid.parseAndRender(src)