Comparing version 1.1.4 to 1.1.5
@@ -5,3 +5,3 @@ { | ||
"description": "Jade template runtime", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "template" |
@@ -332,3 +332,3 @@ 'use strict'; | ||
if (pp) this.buf.push("jade.indent.push('" + Array(this.indents + 1).join(' ') + "');") | ||
if (block || attrs.length) { | ||
if (block || attrs.length || attrsBlocks.length) { | ||
@@ -335,0 +335,0 @@ this.buf.push(name + '.call({'); |
@@ -11,7 +11,9 @@ 'use strict'; | ||
* @param {String} str | ||
* @param {String} filename | ||
* @api private | ||
*/ | ||
var Lexer = module.exports = function Lexer(str) { | ||
var Lexer = module.exports = function Lexer(str, filename) { | ||
this.input = str.replace(/\r\n|\r/g, '\n'); | ||
this.filename = filename; | ||
this.deferredTokens = []; | ||
@@ -283,3 +285,4 @@ this.lastIndents = 0; | ||
if (tok = this.scan(/^([^\.\n][^\n]+)/, 'text')) { | ||
console.warn('Warning: missing space before text for line ' + this.lineno + ' of jade file.'); | ||
console.warn('Warning: missing space before text for line ' + this.lineno + | ||
' of jade file "' + this.filename + '"'); | ||
return tok; | ||
@@ -628,2 +631,5 @@ } | ||
} | ||
this.lineno += str.split("\n").length - 1; | ||
for (var i = 0; i <= str.length; i++) { | ||
@@ -630,0 +636,0 @@ if (isEndOfAttribute(i)) { |
@@ -24,3 +24,3 @@ 'use strict'; | ||
this.input = str.replace(/^\uFEFF/, ''); | ||
this.lexer = new Lexer(this.input); | ||
this.lexer = new Lexer(this.input, filename); | ||
this.filename = filename; | ||
@@ -133,3 +133,3 @@ this.blocks = {}; | ||
var expr = this.parseExpr(); | ||
expr.filename = this.options.filename; | ||
expr.filename = expr.filename || this.filename; | ||
expr.line = next.line; | ||
@@ -136,0 +136,0 @@ block.push(expr); |
{ | ||
"name": "jade", | ||
"description": "Jade template engine", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/visionmedia/jade", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
936038
24042