Skip to content

Some markdown links aren't rendered correctly #17625

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

Closed
qwerty287 opened this issue Nov 12, 2021 · 3 comments · Fixed by #17924
Closed

Some markdown links aren't rendered correctly #17625

qwerty287 opened this issue Nov 12, 2021 · 3 comments · Fixed by #17924
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented outdated/theme/markdown type/bug

Comments

@qwerty287
Copy link
Contributor

qwerty287 commented Nov 12, 2021

Gitea Version

1.16.0

Operating System

No response

Browser Version

Firefox 94.0

Can you reproduce the bug on the Gitea demo site?

Yes

Description

Some links aren't rendered correctly by the md parser.

  1. compare links are rendered like a link to a single commit, but the chars ...<second commit sha> is coming after this text.
  2. if I link to a permanent code snippet and add a single char after the link, the char is included in the rendered link (and in the link the href param is wrong too)

For an example on try with all issues: https://try.gitea.io/ktdkydkycoyf/ex/issues/2#issuecomment-112142

Screenshots

Examples:

  1. see https://codeberg.org/gitnex/GitNex/pulls/1008#issue-77442 - the fifth list point contains a compare link
  2. see https://codeberg.org/gitnex/GitNex/pulls/1014 (there is only one link in this comment, a permanent lines link with a trailing :
@lunny lunny added the type/bug label Nov 15, 2021
@wxiaoguang
Copy link
Contributor

Can you prepare some simple reproducible samples on try.gitea.io? Then we can try to find some ways to fix it.

If you already have ideas about how to fix it, please advise 😊

@qwerty287
Copy link
Contributor Author

qwerty287 commented Nov 15, 2021

Not a repro step, but you can find this comment which summarizes the issues: https://try.gitea.io/ktdkydkycoyf/ex/issues/2#issuecomment-112142
The raw md content is in the code block below the actual comment content

@wxiaoguang wxiaoguang added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented outdated/theme/markdown labels Nov 19, 2021
@wxiaoguang
Copy link
Contributor

I proposed a fix:

@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented outdated/theme/markdown type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants