slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Toc rendering is broken in Firefox

Open kolaente opened this issue 2 years ago • 0 comments

Describe the bug

Using the <Toc/> component with a few slides results in this table of contents being generated:

image

It looks like the html generated by slidev is something like this:

<ol class="slidev-toc-list slidev-toc-list-level-1">
  <li class="slidev-toc-item">
    <a href="/1" class="">
      <div>Welcome to Slidev</div>
    </a>
    <!--v-if-->
  </li>
  <li class="slidev-toc-item">
    <a href="/3" class="">
      <div>What is Slidev?</div>
    </a>
    <!--v-if-->
  </li>

...

</ol>

Notice the <div> tag inside the <a>.

To Reproduce

Here's a reproduction repo: https://github.com/kolaente/slidev-toc-repro

Desktop (please complete the following information):

  • OS: NixOS
  • Browser: Firefox 101.0.1
  • Slidev version: 0.34.3

kolaente avatar Jul 14 '22 09:07 kolaente