Skip to content

Some markdown links aren't rendered correctly #17625

Closed
@qwerty287

Description

@qwerty287

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 :

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions