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

Markdown and links are not friends #1390

Closed
Hywan opened this issue Jul 24, 2023 · 4 comments
Closed

Markdown and links are not friends #1390

Hywan opened this issue Jul 24, 2023 · 4 comments
Labels

Comments

@Hywan
Copy link
Member

Hywan commented Jul 24, 2023

Steps to reproduce

  1. Write the following message:

    https://some.link1/_/lol and https://some.link2/_/bar
    
  2. And send the message.

Outcome

What did you expect?

I expect to see 2 links, and zero emphasize.

What happened instead?

I have 2 broken links, and emphasize between /lol up to link2/.

The Markdown parser considers _ as an emphasize marker, instead of being part of the URL.

It happens also in Element Web. Not tested on Android.

Your phone model

No response

Operating system version

iOS

Application version

nightly 1.2.1 (300)

Homeserver

No response

Will you send logs?

No

@Hywan Hywan added the T-Defect label Jul 24, 2023
@stefanceriu
Copy link
Contributor

It seems that the formatted body is "formatted_body": "https://some.link1/<em>/lol and https://some.link2/</em>/bar" which would point to this being a Rust side bug coming from here https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/matrix-sdk-ffi/src/timeline.rs#L50C8-L50C43

@Hywan
Copy link
Member Author

Hywan commented Jul 26, 2023

Indeed, I ended up in Ruma, which uses pulldown_cmark. I'll raise the bug there.

@Hywan
Copy link
Member Author

Hywan commented Jul 26, 2023

Issue raised here, pulldown-cmark/pulldown-cmark#695.

@Hywan
Copy link
Member Author

Hywan commented Jul 27, 2023

Closing this issue, as it's not a bug, it's just how CommonMarkdown is defined.

@Hywan Hywan closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants