mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 14:30:38 -07:00
3.1.3
This commit is contained in:
Vendored
+5
-6
@@ -132,7 +132,7 @@ var filters = {
|
|||||||
return stringify(v).trim();
|
return stringify(v).trim();
|
||||||
},
|
},
|
||||||
'strip_html': function strip_html(v) {
|
'strip_html': function strip_html(v) {
|
||||||
return stringify(v).replace(/<\/?\s*\w+\s*\/?>/g, '');
|
return stringify(v).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g, '');
|
||||||
},
|
},
|
||||||
'strip_newlines': function strip_newlines(v) {
|
'strip_newlines': function strip_newlines(v) {
|
||||||
return stringify(v).replace(/\n/g, '');
|
return stringify(v).replace(/\n/g, '');
|
||||||
@@ -2285,7 +2285,6 @@ module.exports = function (liquid) {
|
|||||||
return liquid.renderer.renderTemplates(this.elseTemplates, scope);
|
return liquid.renderer.renderTemplates(this.elseTemplates, scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
var length = collection.length;
|
|
||||||
var offset = hash.offset || 0;
|
var offset = hash.offset || 0;
|
||||||
var limit = hash.limit === undefined ? collection.length : hash.limit;
|
var limit = hash.limit === undefined ? collection.length : hash.limit;
|
||||||
|
|
||||||
@@ -2299,10 +2298,10 @@ module.exports = function (liquid) {
|
|||||||
first: i === 0,
|
first: i === 0,
|
||||||
index: i + 1,
|
index: i + 1,
|
||||||
index0: i,
|
index0: i,
|
||||||
last: i === length - 1,
|
last: i === collection.length - 1,
|
||||||
length: length,
|
length: collection.length,
|
||||||
rindex: length - i,
|
rindex: collection.length - i,
|
||||||
rindex0: length - i - 1
|
rindex0: collection.length - i - 1
|
||||||
};
|
};
|
||||||
return ctx;
|
return ctx;
|
||||||
});
|
});
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "liquidjs",
|
"name": "liquidjs",
|
||||||
"version": "3.1.2",
|
"version": "3.1.3",
|
||||||
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
|
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user