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

Mistune 3: regression parsing links with parenthesis #355

Open
davidbgk opened this issue Sep 7, 2023 · 3 comments
Open

Mistune 3: regression parsing links with parenthesis #355

davidbgk opened this issue Sep 7, 2023 · 3 comments

Comments

@davidbgk
Copy link

davidbgk commented Sep 7, 2023

Markdown source: [The Menu](https://en.wikipedia.org/wiki/The_Menu_(2022_film)) (essayez de ne pas vous divulgâcher…).

Previously with Mistune 2 the HTML was:

<a href="https://en.wikipedia.org/wiki/The_Menu_(2022_film)">The Menu</a> (essayez de ne pas vous&nbsp;divulgâcher…).

With Mistune 3 it becomes:

<a href="https://en.wikipedia.org/wiki/The_Menu_(2022_film">The Menu</a>) (essayez de ne pas vous&nbsp;divulgâcher…).

I see why it can be an issue but I'm not sure where to look for the dedicated regexp. At least, this is a basic testcase :)

@davidbgk
Copy link
Author

davidbgk commented Sep 7, 2023

Maybe it's the LINK_HREF_INLINE_RE pattern or PAREN_END_RE has to be used somehow 🤔

@lepture
Copy link
Owner

lepture commented Sep 13, 2023

It requires some time to make it correct, for now you can wrap the url with <>:

[The Menu](<https://en.wikipedia.org/wiki/The_Menu_(2022_film)>) (essayez de ne pas vous divulgâcher…).

@davidbgk
Copy link
Author

I wasn't aware of that syntax, thanks for the trick it solved the parenthesis issue 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants