diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-02-12 19:20:32 +0100 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-02-12 19:20:32 +0100 |
commit | 4555c541a8f98cb6ad4cbec2d7bf85b375dbf505 (patch) | |
tree | 0079507e1885a6c8a94a36644650a865f5e8cc5d /lib/backbone/file.js | |
parent | a853a51a0ba0976e8e28f368bd88717611b3c477 (diff) | |
download | gitbook-4555c541a8f98cb6ad4cbec2d7bf85b375dbf505.zip gitbook-4555c541a8f98cb6ad4cbec2d7bf85b375dbf505.tar.gz gitbook-4555c541a8f98cb6ad4cbec2d7bf85b375dbf505.tar.bz2 |
Replace links to page of summary by html links
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) { |