Making WordPress.org

Opened 2 years ago

Last modified 6 months ago

#5991 new defect (bug)

Handbook TOC can get confused with badly nested headers

Reported by: dd32's profile dd32 Owned by:
Milestone: Priority: normal
Component: Handbooks Keywords:
Cc:

Description

The Handbook TOC code is used in Handbooks and in HelpHub. Today I ran into this article which has a bad TOC: https://wordpress.org/support/article/using-filezilla/

<h3>Why would I want to download FileZilla?</h3>
<h2>Setting Up the Options</h2>
<h2>Connecting</h2>
<h2>Troubleshooting</h2>
<h2>Resources</h2>

which results in a TOC of:

<div class="table-of-contents">
  <h3>Topics</h3>
  <ul class="items">
    <li>
      <a href="#why-would-i-want-to-download-filezilla">Why would I want to download FileZilla?</a>
  </ul></li>
  <li><a href="#setting-up-the-options">Setting Up the Options</a></li>
  <li><a href="#connecting">Connecting</a></li>
  <li><a href="#troubleshooting">Troubleshooting</a></li>
  <li><a href="#resources">Resources</a>
  </ul>
</div>

Obviously the structure of the headings in the source is incorrect, but we can probably account for this in the TOC plugin

Change History (1)

#1 @dd32
6 months ago

#7228 was marked as a duplicate.

Note: See TracTickets for help on using tickets.