Skip to content

Regression in unescaping backslash in TOC title #1360

Closed
@oprypin

Description

@oprypin

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': []}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report.confirmedConfirmed bug report or approved feature request.extensionRelated to one or more of the included extensions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions