-
Notifications
You must be signed in to change notification settings - Fork 443
Open
Description
Describe the bug
The table of contents of a markdown string when mixed header-ids is true contains an incorrect entry that starts with md5- and then a base 64 hash.
To Reproduce
import markdown2
markdown_extensions = {
"header-ids": {"mixed": True,},
"toc": {"depth": 1},
}
print(markdown2.markdown("# `bla`\n\nfdsa", extras=markdown_extensions).toc_html)This prints:
<ul>
<li><a href="#bla"><code>bla</code></a></li>
<li><a href="#bla"><code>md5-37f709a7534c73bf50ab64ed70a78d02</code"></a></li>
</ul>Expected behavior
Only a single <li> entry in the table of contents' <ul>.
Debug info
Version of library being used:
2.5.4
Any extras being used:
See reproducer.
I have reproduced this on e09fb90.
And tried git bisecting this problem and have found 5506a52 to be the first commit were this bug was introduced.
Metadata
Metadata
Assignees
Labels
No labels