How do you generate XHTML using Asciidoctor.js?
I have the following set up in my Node.js application:
const asciidoctor = require('asciidoctor.js')();
const opal = asciidoctor.Opal;
var options = opal.hash2(
['attributes'],
{
attributes: ['showtitle']
});
var asciidoc = `= Test
:backend: xhtml
image:screenshot.png[alt="screenshot"]`;
var html = opal.Asciidoctor.$convert(asciidoc, options);
And while I am setting the
backend
to
xhtml
, the generated HTML is not XHTML markup.
Do I need to explicitly load the XHTML backend, or perhaps I am doing something else wrong?