summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/gitbook-asciidoc/lib/toHTML.js12
-rwxr-xr-xpackages/gitbook-asciidoc/package.json2
2 files changed, 3 insertions, 11 deletions
diff --git a/packages/gitbook-asciidoc/lib/toHTML.js b/packages/gitbook-asciidoc/lib/toHTML.js
index 46203e4..504a20d 100644
--- a/packages/gitbook-asciidoc/lib/toHTML.js
+++ b/packages/gitbook-asciidoc/lib/toHTML.js
@@ -1,21 +1,13 @@
var asciidoctor = require('asciidoctor.js')();
-var opal = asciidoctor.Opal;
-var processor = asciidoctor.Asciidoctor(true);
// Render Asciidoc to HTML (block)
function asciidocToHTML(content) {
- var options = opal.hash2(['attributes'], {'attributes': 'showtitle'});
-
- var html = processor.$convert(content, options);
- return html;
+ return asciidoctor.convert(content, {'attributes': 'showtitle'});
};
// Render Asciidoc to HTML (inline)
function asciidocToHTMLInline(content) {
- var options = Opal.hash({doctype: 'inline', attributes: ['showtitle']});
-
- var html = processor.$convert(content, options);
- return html;
+ return asciidoctor.convert(content, {doctype: 'inline', attributes: 'showtitle'});
};
module.exports = {
diff --git a/packages/gitbook-asciidoc/package.json b/packages/gitbook-asciidoc/package.json
index ea0c397..118bcfe 100755
--- a/packages/gitbook-asciidoc/package.json
+++ b/packages/gitbook-asciidoc/package.json
@@ -6,7 +6,7 @@
"main": "lib/index.js",
"dependencies": {
"lodash": "^4.13.1",
- "asciidoctor.js": "1.5.5-1",
+ "asciidoctor.js": "1.5.5-4",
"gitbook-html": "1.3.3"
},
"devDependencies": {