For some reason when I try to render a table of contents, the resulting HTML emits a comment saying "toc disabled".
Given the following AsciiDoc markup:
var content = `
:toc: macro
= Test
toc::[]
== Title 1 Test
test paragraph
== Title 2 Test
test paragraph`;
I pass it to asciidoctor.js with these options:
var options = opal.hash2(
['attributes'],
{
attributes: ['showtitle']
});
var html = opal.Asciidoctor.$convert(content, options);
And the resulting HTML is as follows:
<h1 id="_test" class="sect0">Test</h1>
<!-- toc disabled -->
<div class="sect1">
<h2 id="_title_1_test">Title 1 Test</h2>
<div class="sectionbody">
<div class="paragraph">
<p>test paragraph</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_title_2_test">Title 2 Test</h2>
<div class="sectionbody">
<div class="paragraph">
<p>test paragraph</p>
</div>
</div>
</div>
Am I missing a setting or something to make it render the toc correctly?