Permalink
Browse files

Release 0.26.2

  • Loading branch information...
1 parent 548b8e2 commit 2859d97e8857795e2a51da9ddc6fcfd1116b054f @tj tj committed Jun 22, 2012
Showing with 20 additions and 11 deletions.
  1. +9 −0 History.md
  2. +6 −6 jade.js
  3. +2 −2 jade.min.js
  4. +1 −1 lib/jade.js
  5. +1 −1 package.json
  6. +1 −1 runtime.min.js
View
@@ -1,4 +1,13 @@
+0.26.2 / 2012-06-22
+==================
+
+ * Added --options alias of --obj
+ * Added reserved word conflict prevention in Google's Closure Compiler
+ * Added tag interpolation. Closes #657
+ * Allow the compiled client to use it's own jade util functions [3rd-Eden]
+ * Fixed `attrs()` escape bug [caseywebdev]
+
0.26.1 / 2012-05-27
==================
View
12 jade.js
@@ -960,7 +960,7 @@ function parse(str, options){
* Compile a `Function` representation of the given jade `str`.
*
* Options:
- *
+ *
* - `compileDebug` when `false` debugging code is stripped from the compiled template
* - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()`
* for use with the Jade client-side runtime.js
@@ -993,7 +993,7 @@ exports.compile = function(str, options){
}
if (client) {
- fn = 'var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow, merge = jade.merge;\n' + fn;
+ fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn;
}
fn = new Function('locals, attrs, escape, rethrow, merge', fn);
@@ -3361,7 +3361,7 @@ if (!Object.keys) {
}
}
return arr;
- }
+ }
}
/**
@@ -3444,7 +3444,7 @@ exports.attrs = function attrs(obj, escaped){
buf.push(key + "='" + JSON.stringify(val) + "'");
} else if ('class' == key && Array.isArray(val)) {
buf.push(key + '="' + exports.escape(val.join(' ')) + '"');
- } else if (escaped[key]) {
+ } else if (escaped && escaped[key]) {
buf.push(key + '="' + exports.escape(val) + '"');
} else {
buf.push(key + '="' + val + '"');
@@ -3488,7 +3488,7 @@ exports.rethrow = function rethrow(err, filename, lineno){
, str = require('fs').readFileSync(filename, 'utf8')
, lines = str.split('\n')
, start = Math.max(lineno - context, 0)
- , end = Math.min(lines.length, lineno + context);
+ , end = Math.min(lines.length, lineno + context);
// Error context
var context = lines.slice(start, end).map(function(line, i){
@@ -3501,7 +3501,7 @@ exports.rethrow = function rethrow(err, filename, lineno){
// Alter exception message
err.path = filename;
- err.message = (filename || 'Jade') + ':' + lineno
+ err.message = (filename || 'Jade') + ':' + lineno
+ '\n' + context + '\n\n' + err.message;
throw err;
};
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -20,7 +20,7 @@ var Parser = require('./parser')
* Library version.
*/
-exports.version = '0.26.1';
+exports.version = '0.26.2';
/**
* Expose self closing tags.
View
@@ -1,7 +1,7 @@
{
"name": "jade",
"description": "Jade template engine",
- "version": "0.26.1",
+ "version": "0.26.2",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"repository": "git://github.com/visionmedia/jade",
"main": "./index.js",
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 2859d97

Please sign in to comment.