mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
refactor: use assert, fix: respect to express settings.views, close #16
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
const lexical = require('./lexical.js');
|
||||
const ParseError = require('./util/error.js').ParseError;
|
||||
const assert = require('./util/assert.js');
|
||||
|
||||
module.exports = function(Tag, Filter) {
|
||||
|
||||
@@ -71,7 +72,7 @@ module.exports = function(Tag, Filter) {
|
||||
|
||||
function parseOutput(str) {
|
||||
var match = lexical.matchValue(str);
|
||||
if(!match) throw new Error(`illegal output string: ${str}`);
|
||||
assert(match, `illegal output string: ${str}`);
|
||||
|
||||
var initial = match[0];
|
||||
str = str.substr(match.index + match[0].length);
|
||||
|
||||
Reference in New Issue
Block a user