mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 06:20:38 -07:00
fix: properly treat unicode blanks, fixes #221
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Liquid } from '../..'
|
||||
import { expect, use } from 'chai'
|
||||
import * as chaiAsPromised from 'chai-as-promised'
|
||||
|
||||
use(chaiAsPromised)
|
||||
|
||||
describe('Issues', function () {
|
||||
it('#221 unicode blanks are not properly treated', async () => {
|
||||
const engine = new Liquid({ strictVariables: true, strictFilters: true })
|
||||
const html = engine.parseAndRenderSync('{{huh | truncate: 11}}', { huh: 'fdsafdsafdsafdsaaaaa' })
|
||||
expect(html).to.equal('fdsafdsa...')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user