Skip to content

Commit 24d38e4

Browse files
committed
Fix GitbookIO#1263: Fix page generation for AsciiDoc
1 parent efb65a8 commit 24d38e4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/models/parser.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Parser.prototype.parseGlossary = function(content) {
4343

4444
Parser.prototype.preparePage = function(content) {
4545
var page = this.get('page');
46+
if (!page.prepare) {
47+
return Promise(content);
48+
}
49+
4650
return Promise(page.prepare(content));
4751
};
4852

lib/output/__tests__/website.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ describe('WebsiteGenerator', function() {
1212
});
1313
});
1414

15+
pit('should generate an index.html for AsciiDoc', function() {
16+
return generateMock(WebsiteGenerator, {
17+
'README.adoc': 'Hello World'
18+
})
19+
.then(function(folder) {
20+
expect(folder).toHaveFile('index.html');
21+
});
22+
});
23+
1524
pit('should generate an HTML file for each articles', function() {
1625
return generateMock(WebsiteGenerator, {
1726
'README.md': 'Hello World',

0 commit comments

Comments
 (0)