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