Skip to content

GFM header IDs fail if header contains span markup #391

@nfagerlund

Description

@nfagerlund

On GitHub proper (and kramdown prior to 1.13.0), the following MD:

### `code-span`

...results in the following HTML:

<h3 id="code-span"><code>code-span</code></h3>

Now, though, it results in something like:

<h3 id="-18"><code>code-span</code></h3>

(...assuming this wasn't the first code-span header in the page.)

This is bad, and also does not match what GitHub does.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions