Compare commits

...
4 Commits
Author SHA1 Message Date
harttle 0325eacddf 2.1.2 2017-12-08 10:42:27 +08:00
harttle a21fcf6f87 fix: compatible to nodejs<=4 2017-12-08 10:42:00 +08:00
harttle 7bb2ee2213 2.1.1 2017-12-08 00:29:09 +08:00
harttle b24582c2c4 remove debug message, working on #50 2017-12-08 00:28:51 +08:00
6 changed files with 3 additions and 7 deletions
-2
View File
@@ -1671,7 +1671,6 @@ var formatCodes = {
},
z: function z(d) {
var tz = d.getTimezoneOffset() / 60 * 100;
console.log('tz', tz);
return (tz > 0 ? '-' : '+') + _number.pad(Math.abs(tz), 4);
},
'%': function _() {
@@ -1887,7 +1886,6 @@ function shouldTrimRight(token, inRaw, options) {
function trimLeft(token, greedy) {
if (!token || token.type !== 'html') return;
console.log('trimming', token.value);
var rLeft = greedy ? /\s+$/g : /[\t\r ]*$/g;
token.value = token.value.replace(rLeft, '');
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -24,7 +24,7 @@ var filters = {
'ceil': v => Math.ceil(v),
'concat': (v, arg) => Array.prototype.concat.call(v, arg),
'date': (v, arg) => {
let date = v
var date = v
if (v === 'now') {
date = new Date()
} else if (_.isString(v)) {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "liquidjs",
"version": "2.1.0",
"version": "2.1.2",
"description": "A Liquid template engine for Node.js and browsers, with all shopify/liquid features.",
"main": "index.js",
"scripts": {
-1
View File
@@ -163,7 +163,6 @@ var formatCodes = {
},
z: function (d) {
var tz = d.getTimezoneOffset() / 60 * 100
console.log('tz', tz)
return (tz > 0 ? '-' : '+') + _number.pad(Math.abs(tz), 4)
},
'%': function () {
-1
View File
@@ -33,7 +33,6 @@ function shouldTrimRight (token, inRaw, options) {
function trimLeft (token, greedy) {
if (!token || token.type !== 'html') return
console.log('trimming', token.value)
var rLeft = greedy ? /\s+$/g : /[\t\r ]*$/g
token.value = token.value.replace(rLeft, '')
}