diff options
author | Guillaume Grossetie <g.grossetie@gmail.com> | 2016-12-22 11:42:03 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-12-22 11:46:29 +0100 |
commit | 37e44ee666126d2c48149d17fd095ba33d2b1344 (patch) | |
tree | 9db381babb39c9646c2daf46e44c425ee0f4b254 /packages/gitbook-asciidoc/lib | |
parent | 9eb1c318b7ced91534993054c29f80e8d2013ce8 (diff) | |
download | gitbook-37e44ee666126d2c48149d17fd095ba33d2b1344.zip gitbook-37e44ee666126d2c48149d17fd095ba33d2b1344.tar.gz gitbook-37e44ee666126d2c48149d17fd095ba33d2b1344.tar.bz2 |
Upgrade to Asciidoctor.js 1.5.5-4 (#17)
Diffstat (limited to 'packages/gitbook-asciidoc/lib')
-rw-r--r-- | packages/gitbook-asciidoc/lib/toHTML.js | 12 |
1 files changed, 2 insertions, 10 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 = { |