Comparing version 0.8.8 to 0.8.9
0.8.9 / 2011-03-15 | ||
================== | ||
* Fixed preservation of newlines in text blocks | ||
0.8.8 / 2011-03-14 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -175,3 +175,3 @@ | ||
} else { | ||
this.buffer(fn(utils.text(filter.block.join('\\n')), filter.attrs)); | ||
this.buffer(fn(utils.text(filter.block.join('')), filter.attrs)); | ||
} | ||
@@ -188,3 +188,3 @@ }, | ||
visitText: function(text){ | ||
text = utils.text(text.join('\\n')); | ||
text = utils.text(text.join('')); | ||
if (this.escape) text = escape(text); | ||
@@ -191,0 +191,0 @@ this.buffer(text); |
@@ -20,3 +20,3 @@ | ||
exports.version = '0.8.8'; | ||
exports.version = '0.8.9'; | ||
@@ -23,0 +23,0 @@ /** |
@@ -393,3 +393,3 @@ | ||
/** | ||
* Indent. | ||
* Indent | Outdent | Newline. | ||
*/ | ||
@@ -431,3 +431,3 @@ | ||
// blank line | ||
if ('\n' == this.input[0]) return this.advance(); | ||
if ('\n' == this.input[0]) return this.tok('newline'); | ||
@@ -434,0 +434,0 @@ // outdent |
@@ -110,4 +110,4 @@ | ||
block.line = this.line(); | ||
while (this.peek().type !== 'eos') { | ||
if (this.peek().type === 'newline') { | ||
while ('eos' != this.peek().type) { | ||
if ('newline' == this.peek().type) { | ||
this.advance(); | ||
@@ -297,9 +297,11 @@ } else { | ||
case 'newline': | ||
if (pipeless) text.push('\\n'); | ||
text.push('\\n'); | ||
this.advance(); | ||
break; | ||
case 'indent': | ||
text.push('\\n'); | ||
text.push(this.parseTextBlock().map(function(text){ | ||
return ' ' + text; | ||
}).join('\\n')); | ||
}).join('')); | ||
text.push('\\n'); | ||
break; | ||
@@ -388,3 +390,3 @@ default: | ||
// newline* | ||
while (this.peek().type === 'newline') this.advance(); | ||
while ('newline' == this.peek().type) this.advance(); | ||
@@ -391,0 +393,0 @@ // Assume newline when tag followed by text |
{ | ||
"name": "jade", | ||
"description": "Jade template engine", | ||
"version": "0.8.8", | ||
"version": "0.8.9", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "main": "./index.js", |
Sorry, the diff of this file is not supported yet
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
71327
1801