1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
var PathUtils = require('../utils/path'); /** Resolve an absolute path (extracted from a link) @param {Output} output @param {String} filePath @return {String} */ function resolveFile(output, filePath) { var pages = output.getPages(); var page = pages.get(filePath); if (!page) { return filePath; } return PathUtils.setExtension(filePath, '.html'); } module.exports = resolveFile;