New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

liquid-node

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquid-node - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

CHANGELOG.md

50

lib/liquid/block.js

@@ -47,25 +47,3 @@ // Generated by CoffeeScript 1.7.1

return function() {
var Tag, match, tag;
if (Block.IsTag.test(token.value)) {
match = Block.FullToken.exec(token.value);
if (!match) {
throw new Liquid.SyntaxError("Tag '" + token.value + "' was not properly terminated with regexp: " + Liquid.TagEnd.inspect);
}
if (_this.blockDelimiter() === match[1]) {
return _this.endTag();
}
Tag = _this.template.tags[match[1]];
if (!Tag) {
return _this.unknownTag(match[1], match[2], tokens);
}
tag = new Tag(_this.template, match[1], match[2]);
_this.nodelist.push(tag);
return tag.parseWithCallbacks(tokens);
} else if (Block.IsVariable.test(token.value)) {
return _this.nodelist.push(_this.createVariable(token));
} else if (token.value.length === 0) {
} else {
return _this.nodelist.push(token.value);
}
return _this.parseToken(token, tokens);
};

@@ -91,2 +69,28 @@ })(this))["catch"]((function(_this) {

Block.prototype.parseToken = function(token, tokens) {
var Tag, match, tag;
if (Block.IsTag.test(token.value)) {
match = Block.FullToken.exec(token.value);
if (!match) {
throw new Liquid.SyntaxError("Tag '" + token.value + "' was not properly terminated with regexp: " + Liquid.TagEnd.inspect);
}
if (this.blockDelimiter() === match[1]) {
return this.endTag();
}
Tag = this.template.tags[match[1]];
if (!Tag) {
return this.unknownTag(match[1], match[2], tokens);
}
tag = new Tag(this.template, match[1], match[2]);
this.nodelist.push(tag);
return tag.parseWithCallbacks(tokens);
} else if (Block.IsVariable.test(token.value)) {
return this.nodelist.push(this.createVariable(token));
} else if (token.value.length === 0) {
} else {
return this.nodelist.push(token.value);
}
};
Block.prototype.endTag = function() {

@@ -93,0 +97,0 @@ return this.ended = true;

@@ -73,2 +73,10 @@ // Generated by CoffeeScript 1.7.1

Engine.prototype.parseAndRender = function() {
var args, source;
source = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
return this.parse(source).then(function(template) {
return template.render.apply(template, args);
});
};
return Engine;

@@ -75,0 +83,0 @@

@@ -15,3 +15,3 @@ {

"description": "Node.js port of Tobias Lütke's Liquid template engine.",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "https://github.com/sirlantis/liquid-node",

@@ -18,0 +18,0 @@ "bugs": "https://github.com/sirlantis/liquid-node/issues",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc