Permalink
Browse files

Prepared release 0.26.0

  • Loading branch information...
1 parent 7e6eb1c commit 47bab06d8a1f0942b2378c89561a9f710b6dceab @tj tj committed May 4, 2012
Showing with 26 additions and 6 deletions.
  1. +9 −0 History.md
  2. +13 −2 jade.js
  3. +2 −2 jade.min.js
  4. +1 −1 lib/jade.js
  5. +1 −1 package.json
View
@@ -1,4 +1,13 @@
+0.26.0 / 2012-05-04
+==================
+
+ * Added package.json __component__ support
+ * Added explicit self-closing tag support. Closes #605
+ * Added `block` statement
+ * Added mixin tag-like behaviour [chowey]
+ * Fixed mixins with extends [chowey]
+
0.25.0 / 2012-04-18
==================
View
15 jade.js
@@ -392,7 +392,7 @@ Compiler.prototype = {
if (pp && !tag.isInline())
this.prettyIndent(0, true);
- if (~selfClosing.indexOf(name) && !this.xml) {
+ if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) {
this.buffer('<' + name);
this.visitAttributes(tag.attrs);
this.terse
@@ -2614,6 +2614,9 @@ Parser.prototype = {
this.context(parser);
var ast = parser.parse();
this.context();
+ // hoist mixins
+ for (var name in this.mixins)
+ ast.unshift(this.mixins[name]);
return ast;
}
@@ -2954,6 +2957,8 @@ Parser.prototype = {
var path = join(dir, path)
, str = fs.readFileSync(path, 'utf8')
, parser = new Parser(str, path, this.options);
+ parser.blocks = this.blocks;
+ parser.mixins = this.mixins;
this.context(parser);
var ast = parser.parse();
@@ -3096,7 +3101,13 @@ Parser.prototype = {
break out;
}
}
-
+
+ // self-closing
+ if ('/' == this.peek().val) {
+ this.advance();
+ tag.selfClosing = true;
+ }
+
return this.tag(tag);
},
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.25.0';
+exports.version = '0.26.0';
/**
* Expose self closing tags.
View
@@ -1,7 +1,7 @@
{
"name": "jade",
"description": "Jade template engine",
- "version": "0.25.0",
+ "version": "0.26.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"repository": "git://github.com/visionmedia/jade",
"main": "./index.js",

0 comments on commit 47bab06

Please sign in to comment.