blob: 4fb45bdefd8170424c2a7370c54fa4e3c5b782ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
var asciidoctor = require('asciidoctor.js')();
var opal = asciidoctor.Opal;
var processor = null;
var useExtensions = true;
if (useExtensions) {
processor = asciidoctor.Asciidoctor(true);
} else {
processor = asciidoctor.Asciidoctor();
}
var convert = function(content) {
var options = opal.hash2(['attributes'], {'attributes': 'showtitle'});
var html = processor.$convert(content, options);
return html;
};
module.exports = convert;
|