Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Eliminate useless var definitions."

This reverts commit 22bcdae.
  • Loading branch information...
commit 3982c54584a8ecf414412357a4e940fb1f32241e 1 parent 85e11c4
@tj tj authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 lib/parser.js
View
15 lib/parser.js
@@ -392,10 +392,10 @@ Parser.prototype = {
if (!this.filename)
throw new Error('the "filename" option is required to extend templates');
- path = this.expect('extends').val.trim();
+ var path = this.expect('extends').val.trim();
var dir = dirname(this.filename);
- path = join(dir, path + '.jade');
+ var path = join(dir, path + '.jade');
var str = fs.readFileSync(path, 'utf8');
var parser = new Parser(str, path, this.options);
@@ -449,9 +449,8 @@ Parser.prototype = {
var dirname = path.dirname;
var basename = path.basename;
var join = path.join;
- var str;
- path = this.expect('include').val.trim();
+ var path = this.expect('include').val.trim();
var dir = dirname(this.filename);
if (!this.filename)
@@ -464,16 +463,16 @@ Parser.prototype = {
// non-jade
if ('.jade' != path.substr(-5)) {
- path = join(dir, path);
- str = fs.readFileSync(path, 'utf8').replace(/\r/g, '');
+ var path = join(dir, path);
+ var str = fs.readFileSync(path, 'utf8').replace(/\r/g, '');
var ext = extname(path).slice(1);
var filter = filters[ext];
if (filter) str = filter(str, { filename: path }).replace(/\\n/g, '\n');
return new nodes.Literal(str);
}
- path = join(dir, path);
- str = fs.readFileSync(path, 'utf8');
+ var path = join(dir, path);
+ var str = fs.readFileSync(path, 'utf8');
var parser = new Parser(str, path, this.options);
parser.blocks = utils.merge({}, this.blocks);
parser.mixins = this.mixins;
Please sign in to comment.
Something went wrong with that request. Please try again.