mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Fix #1263: Fix page generation for AsciiDoc
This commit is contained in:
@@ -43,6 +43,10 @@ Parser.prototype.parseGlossary = function(content) {
|
||||
|
||||
Parser.prototype.preparePage = function(content) {
|
||||
var page = this.get('page');
|
||||
if (!page.prepare) {
|
||||
return Promise(content);
|
||||
}
|
||||
|
||||
return Promise(page.prepare(content));
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,15 @@ describe('WebsiteGenerator', function() {
|
||||
});
|
||||
});
|
||||
|
||||
pit('should generate an index.html for AsciiDoc', function() {
|
||||
return generateMock(WebsiteGenerator, {
|
||||
'README.adoc': 'Hello World'
|
||||
})
|
||||
.then(function(folder) {
|
||||
expect(folder).toHaveFile('index.html');
|
||||
});
|
||||
});
|
||||
|
||||
pit('should generate an HTML file for each articles', function() {
|
||||
return generateMock(WebsiteGenerator, {
|
||||
'README.md': 'Hello World',
|
||||
|
||||
Reference in New Issue
Block a user