Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link with underscores and parantheses wrapped in underscores is parsed incorrectly #3468

Closed
Brakebein opened this issue Sep 30, 2024 · 1 comment · Fixed by #3475
Closed
Labels
category: inline elements L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue

Comments

@Brakebein
Copy link

Marked version: 14.1.2

Describe the bug
A link is not parsed correctly if it contains underscores and parantheses, and is itself wrapped with underscores (e.g. for styling italics).
Pattern: _[Link title](https://domain.org/link_with_underscores_(parantheses))_

To Reproduce
Open Marked demo link. In CommonMark Demo it is displayed correctly.

  1. Marked Demo
  2. CommonMark Demo

Expected behavior
Only (interactive) link title should be displayed with italics/bold styling (see CommonMark demo).

@UziTech UziTech added L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue category: inline elements labels Sep 30, 2024
@UziTech
Copy link
Member

UziTech commented Sep 30, 2024

Looks like this is because of the way we parse the strong\em we need to try to make sure the end is not inside a link

The workaround is to use * for the italics. Demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inline elements L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants