mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
change: default extname to "", working for #41
This commit is contained in:
@@ -82,7 +82,7 @@ The full list of options for `Liquid()` is listed as following:
|
||||
If an array, the files are looked up in the order they occur in the array.
|
||||
Defaults to `["."]`
|
||||
|
||||
* `extname` is used to lookup the template file when filepath doesn't include an extension name. Set to `""` if you do **NOT** want liquidjs to append default extname. Defaults to `".liquid"`.
|
||||
* `extname` is used to lookup the template file when filepath doesn't include an extension name. Eg: setting to `".html"` will allow including file by basename. Defaults to `""`.
|
||||
|
||||
* `cache` indicates whether or not to cache resolved templates. Defaults to `false`.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ function factory (options) {
|
||||
options = _.assign({
|
||||
root: ['.'],
|
||||
cache: false,
|
||||
extname: '.liquid',
|
||||
extname: '',
|
||||
trim_tag_right: false,
|
||||
trim_tag_left: false,
|
||||
trim_value_right: false,
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ describe('liquid', function () {
|
||||
.to.eventually.equal('foo')
|
||||
})
|
||||
it('should find files without extname', function () {
|
||||
var engine = Liquid({root: '/root', extname: ''})
|
||||
var engine = Liquid({root: '/root'})
|
||||
return expect(engine.renderFile('/root/files/bar', ctx))
|
||||
.to.eventually.equal('bar')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user