• Resolved Bjarne Oldrup

    (@oldrup)


    Hey 🙂

    SimpleTOC automatically generates id’s for the headings, right?

    It appears that might generate duplicate id’s 🤔

    So if I have a structure like:

    <h2>The cucumber shop</h2>
      <h3>Location</h3>
    
    <h2>The mango shop</h2>
      <h3>Location</h3>

    … then both h3’s would be assigned the id="location" potentially causing some issues.

    And it appears to happen on all posts and pages, even where SimpleTOC isn’t being used.

    A workaround could be manually to assign a unique ID to each h3, like id="location-cucumber" and id="location-mango" and that might be doable on pages and posts where I’m actually using the SimpleTOC block and testing navigation after edit. But if an ID is assigned to all headings on all posts, regardless of whether SimpleTOC is used or not … it’s a lot of work.

    Am I doing it wrong? Are you able to reproduce?

    All the best
    Bjarne

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Identical headings on same post, getting identical id’s?’ is closed to new replies.