diff options
author | Soreine <nicolas@gitbook.com> | 2016-05-17 12:48:03 +0200 |
---|---|---|
committer | Soreine <nicolas@gitbook.com> | 2016-05-17 12:48:03 +0200 |
commit | 167d3957bf2caa1f46bc1b1ef5084fd468594c8d (patch) | |
tree | 4213d84826f73f25d8d3c12f6d48aad5a6da9c2c /lib/parse/parseStructureFile.js | |
parent | a9571fd67d3d638d6d9d6c11a7e626c5600a68a2 (diff) | |
download | gitbook-167d3957bf2caa1f46bc1b1ef5084fd468594c8d.zip gitbook-167d3957bf2caa1f46bc1b1ef5084fd468594c8d.tar.gz gitbook-167d3957bf2caa1f46bc1b1ef5084fd468594c8d.tar.bz2 |
Expose lookup method for parsable files
Diffstat (limited to 'lib/parse/parseStructureFile.js')
-rw-r--r-- | lib/parse/parseStructureFile.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/parse/parseStructureFile.js b/lib/parse/parseStructureFile.js index fe8c935..718f731 100644 --- a/lib/parse/parseStructureFile.js +++ b/lib/parse/parseStructureFile.js @@ -1,6 +1,6 @@ -var findParsableFile = require('./findParsableFile'); var Promise = require('../utils/promise'); var error = require('../utils/error'); +var lookupStructureFile = require('./lookupStructureFile'); /** Parse a ParsableFile using a specific method @@ -55,11 +55,8 @@ function parseFile(fs, file, type) { */ function parseStructureFile(book, type) { var fs = book.getContentFS(); - var config = book.getConfig(); - var fileToSearch = config.getValue(['structure', type]); - - return findParsableFile(book, fileToSearch) + return lookupStructureFile(book, type) .then(function(file) { if (!file) return [undefined, undefined]; |