Skip to content

header-ids create duplicate ids #661

@pmjdebruijn

Description

@pmjdebruijn

Describe the bug

There is a corner case where header-ids end up generate duplicate ids.

To Reproduce

# Chapter

Test

# Chapter

Test

# Chapter 2

Test

Results in:

<h1 id="chapter">Chapter</h1>

<p>Test</p>

<h1 id="chapter-2">Chapter</h1>

<p>Test</p>

<h1 id="chapter-2">Chapter 2</h1>

<p>Test</p>

Note the duplicate chapter-2 id.

Expected behavior
There shouldn't be any duplicates created...

Maybe a more robust approach would be to suffix the sequence number as :SEQ as opposed to -SEQ ?

Debug info
2.5.4

Any extras being used:
header-ids

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions