Skip to content

Placeholder in HTML markup #1571

@zyxw59

Description

@zyxw59

When the markdown source contains an inline HTML comment which contains a markdown link whose text contains markdown formatting, the resulting HTML contains the placeholder for the formatted text.

>>> markdown.markdown("For example <!-- [**Bold link**](http://example.com) -->")
'<p>For example <!-- <a href="http://example.com">\x02klzzwxh:0000\x03</a> --></p>'

This is similar to #42, but only occurs when there is formatting in the link text.

Also notable is that this behavior for comments only occurs when the comment does not start a line — HTML comments at the start of a line are not processed for markdown syntax at all.

For a real-world example of this bug, see rust-lang/this-week-in-rust#7299

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report.confirmedConfirmed bug report or approved feature request.coreRelated to the core parser code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions