Now I found another issue similar to #1358 and I checked that its fix doesn't also fix this one.
Regression in 3.4 - c0f6e5a is the first bad commit
Reproduction code:
import markdown md = markdown.Markdown(extensions=['toc']) s = r''' ### hello \[foo] ''' md.convert(s) print(md.toc_tokens)
Output before vs after:
[{'level': 3, 'id': 'hello-foo', 'name': 'hello [foo]', 'children': []}]
[{'level': 3, 'id': 'hello-foo', 'name': 'hello \x0291\x03foo]', 'children': []}]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4