diff options
Diffstat (limited to 'lib/backbone/file.js')
-rw-r--r-- | lib/backbone/file.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/backbone/file.js b/lib/backbone/file.js index a58063c..6c46d5e 100644 --- a/lib/backbone/file.js +++ b/lib/backbone/file.js @@ -7,7 +7,7 @@ function BackboneFile(book) { this.log = this.book.log; // Filename in the book - this.filename = ''; + this.path = ''; this.parser; _.bindAll(this); @@ -23,7 +23,7 @@ BackboneFile.prototype.parse = function() { // Return true if backbone file exists BackboneFile.prototype.exists = function() { - return Boolean(this.filename); + return Boolean(this.path); }; // Locate a backbone file, could be .md, .asciidoc, etc @@ -36,7 +36,7 @@ BackboneFile.prototype.locate = function() { .then(function(result) { if (!result) return; - that.filename = result.path; + that.path = result.path; that.parser = result.parser; }); }; @@ -44,15 +44,15 @@ BackboneFile.prototype.locate = function() { // Read and parse the file BackboneFile.prototype.load = function() { var that = this; - this.log.debug.ln('loading', this.type, ':', that.filename); + this.log.debug.ln('loading', this.type, ':', that.path); return this.locate() .then(function() { - if (!that.filename) return; + if (!that.path) return; - that.log.debug.ln(that.type, 'located at', that.filename); + that.log.debug.ln(that.type, 'located at', that.path); - return that.book.readFile(that.filename) + return that.book.readFile(that.path) // Parse it .then(function(content) { |