mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
feat: full syntax for strftime, close #177
- strftime syntax: <flags><width><modifier><conversion> - new conversions: %n, %t - fixed conversions: %N - flags: _ ^ - 0 # : - modifiers: E, O (ignored)
This commit is contained in:
@@ -12,7 +12,7 @@ describe('LiquidOptions#fs', function () {
|
||||
engine = new Liquid({
|
||||
root: '/root/',
|
||||
fs
|
||||
})
|
||||
} as any)
|
||||
})
|
||||
it('should be used to read templates', function () {
|
||||
return engine.renderFile('files/foo')
|
||||
|
||||
@@ -18,8 +18,8 @@ describe('Liquid', function () {
|
||||
})
|
||||
it('should call plugin with Liquid', async function () {
|
||||
const engine = new Liquid()
|
||||
engine.plugin(function (Liquid) {
|
||||
this.registerFilter('t', x => isFalsy(x))
|
||||
engine.plugin(function () {
|
||||
this.registerFilter('t', isFalsy)
|
||||
})
|
||||
const html = await engine.parseAndRender('{{false|t}}')
|
||||
expect(html).to.equal('true')
|
||||
|
||||
Reference in New Issue
Block a user