mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Add block "markdown", "asciidoc" and "markup"
This commit is contained in:
@@ -12,5 +12,25 @@ module.exports = {
|
||||
html: false,
|
||||
body: blk.body
|
||||
};
|
||||
},
|
||||
|
||||
// Render some markdown to HTML
|
||||
markdown: function(blk) {
|
||||
return this.book.renderInline('markdown', blk.body)
|
||||
.then(function(out) {
|
||||
return { body: out };
|
||||
});
|
||||
},
|
||||
asciidoc: function(blk) {
|
||||
return this.book.renderInline('asciidoc', blk.body)
|
||||
.then(function(out) {
|
||||
return { body: out };
|
||||
});
|
||||
},
|
||||
markup: function(blk) {
|
||||
return this.book.renderInline(this.ctx.file.type, blk.body)
|
||||
.then(function(out) {
|
||||
return { body: out };
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user