This commit is contained in:
harttle
2017-04-10 19:07:51 +08:00
parent 8ff9eeb51d
commit cc2b2ea5d1
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -591,7 +591,7 @@ var hash = new RegExp('(?:' + identifier.source + ')\\s*:\\s*(?:' + value.source
var hashCapture = new RegExp('(' + identifier.source + ')\\s*:\\s*(' + value.source + ')', 'g'); var hashCapture = new RegExp('(' + identifier.source + ')\\s*:\\s*(' + value.source + ')', 'g');
// full match // full match
var tagLine = new RegExp('^\\s*(' + identifier.source + ')\\s*(.*)\\s*$'); var tagLine = new RegExp('^\\s*(' + identifier.source + ')\\s*([\\s\\S]*)\\s*$');
var literalLine = new RegExp('^' + literal.source + '$', 'i'); var literalLine = new RegExp('^' + literal.source + '$', 'i');
var variableLine = new RegExp('^' + variable.source + '$'); var variableLine = new RegExp('^' + variable.source + '$');
var numberLine = new RegExp('^' + number.source + '$'); var numberLine = new RegExp('^' + number.source + '$');
@@ -1217,7 +1217,7 @@ function parse(html, filepath, options) {
html = whiteSpaceCtrl(html, options); html = whiteSpaceCtrl(html, options);
var tokens = []; var tokens = [];
var syntax = /({%-?(.*?)-?%})|({{(.*?)}})/g; var syntax = /({%-?([\s\S]*?)-?%})|({{([\s\S]*?)}})/g;
var result, htmlFragment, token; var result, htmlFragment, token;
var lastMatchEnd = 0, var lastMatchEnd = 0,
lastMatchBegin = -1, lastMatchBegin = -1,
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "shopify-liquid", "name": "shopify-liquid",
"version": "1.7.6", "version": "1.7.7",
"description": "A feature-rich Liquid template engine for Node.js and browsers, with compliance with the Ruby version.", "description": "A feature-rich Liquid template engine for Node.js and browsers, with compliance with the Ruby version.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {