summaryrefslogtreecommitdiffstats
path: root/packages/gitbook/src/output/generatePage.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook/src/output/generatePage.js')
-rw-r--r--packages/gitbook/src/output/generatePage.js17
1 files changed, 5 insertions, 12 deletions
diff --git a/packages/gitbook/src/output/generatePage.js b/packages/gitbook/src/output/generatePage.js
index 671ac54..36a5780 100644
--- a/packages/gitbook/src/output/generatePage.js
+++ b/packages/gitbook/src/output/generatePage.js
@@ -39,37 +39,30 @@ function generatePage(output, page) {
return callPageHook('page:before', output, resultPage)
// Escape code blocks with raw tags
- .then(function(currentPage) {
+ .then((currentPage) => {
return parser.preparePage(currentPage.getContent());
})
// Render templating syntax
- .then(function(content) {
+ .then((content) => {
const absoluteFilePath = path.join(book.getContentRoot(), filePath);
return Templating.render(engine, absoluteFilePath, content, context);
})
- .then(function(output) {
- const content = output.getContent();
-
+ .then((content) => {
return parser.parsePage(content)
.then(function(result) {
return output.setContent(result.content);
});
})
- // Post processing for templating syntax
- .then(function(output) {
- return Templating.postRender(engine, output);
- })
-
// Return new page
- .then(function(content) {
+ .then((content) => {
return resultPage.set('content', content);
})
// Call final hook
- .then(function(currentPage) {
+ .then((currentPage) => {
return callPageHook('page', output, currentPage);
});
})