Skip to content

Link with square bracket in inline code can break wrapping italic that uses _ #3774

@mjbvz

Description

@mjbvz

Marked version: 16.3.0 / master

Describe the bug
Links that contain inline code with square brackets seem to break italics that use _.

To Reproduce

Repo

For this example, you need both the square brackets in the link text and an _ anywhere in the link. This breaks the italic _ wrapping the entire link

_[`a[b]c`](http://example.com/_/path)_

Expected behavior
Commonmark dingus

This should be rendered in italic as link where the text is the inline code a[b]c

Metadata

Metadata

Assignees

No one assigned

    Labels

    L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issuecategory: mixed content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions