-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sidebar table of contents are unable to be generated when using Setext headers #1337
Comments
|
Okay, so apparently the END_TOC marker is not added when using Setext: HTML dump for ATX<ul class="table-of-contents">\n
<li>\n
<a href="#chapter-i-down-the-rabbit-hole">CHAPTER I. DOWN THE RABBIT-HOLE.</a>\n
</li>\n
</ul>\n
<p>[[END_TOC]]</p>\n
<h1><a id="content-adventures-in-wonderland" href="#adventures-in-wonderland" class="heading-permalink" aria-hidden="true" title="Permalink">¶</a>Adventures in Wonderland</h1>\n
<h2><a id="content-chapter-i-down-the-rabbit-hole" href="#chapter-i-down-the-rabbit-hole" class="heading-permalink" aria-hidden="true" title="Permalink">¶</a>CHAPTER I. DOWN THE RABBIT-HOLE.</h2>\n
<p>So she was considering in her own mind, as well as she could, for the hot day made her feel very sleepy and stupid.</p>\n HTML dump for Setext<ul class="table-of-contents">\n
<li>\n
<a href="#chapter-i-down-the-rabbit-hole">CHAPTER I. DOWN THE RABBIT-HOLE.</a>\n
</li>\n
</ul>\n
<h1><a id="content-endtocadventures-in-wonderland" href="#endtocadventures-in-wonderland" class="heading-permalink" aria-hidden="true" title="Permalink">¶</a>[[END_TOC]]\n
Adventures in Wonderland</h1>\n
<h2><a id="content-chapter-i-down-the-rabbit-hole" href="#chapter-i-down-the-rabbit-hole" class="heading-permalink" aria-hidden="true" title="Permalink">¶</a>CHAPTER I. DOWN THE RABBIT-HOLE.</h2>\n
<p>So she was considering in her own mind, as well as she could, for the hot day made her feel very sleepy and stupid.</p>\n |
I think this is because we append the END_TOC marker first in the document, but maybe that is stripped from the converter input downstream? |
Okay, output dir is unrelated. OP updated to reflect |
Fixed in #1343 |
New issue description
Okay, here is the updated issue as I have scoped down the repro and root issue.
Minimal reproducible example code:
Results in:
TypeError : substr(): Argument #3 ($length) must be of type ?int, bool given
Original description
This seems to be a very confusing combination of edge cases.
But for some reason, when using the following configuration:
And a documentation page with Setext headers, like so: (Using front matter makes no difference)
Foo Bar ======= This is a test.
You get the following crash when running the build command:
The text was updated successfully, but these errors were encountered: