rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

[TOC Block]: The block loses the id after editing the title or heading #168

Closed Nickbahson closed 1 year ago

Nickbahson commented 1 year ago

Describe the bug When I insert the Rank Math Table of Contents through the Gutenberg editor and don’t edit it at all, it has the following structure:

<div class="wp-block-rank-math-toc-block" id="rank-math-toc">
   <h2>Table of Contents</h2>
   <nav>
    <ul>
      <li>my headings</li>
   </ul>
</div>

However, if I change the text in the headings to anything, the block loses the id=“rank-math-toc” ID attribute part.

To Reproduce Steps to reproduce the behavior:

  1. Have a blog post
  2. Add the Table of Contents block through the Gutenberg editor
  3. Click on the title and change it to anything
  4. Observe the missing ID