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

Rework markup link rendering (#26745) #28803

Merged
merged 3 commits into from
Jan 16, 2024

Commits on Jan 15, 2024

  1. Rework markup link rendering (go-gitea#26745)

    Fixes go-gitea#26548
    
    This PR refactors the rendering of markup links. The old code uses
    `strings.Replace` to change some urls while the new code uses more
    context to decide which link should be generated.
    
    The added tests should ensure the same output for the old and new
    behaviour (besides the bug).
    
    We may need to refactor the rendering a bit more to make it clear how
    the different helper methods render the input string. There are lots of
    options (resolve links / images / mentions / git hashes / emojis / ...)
    but you don't really know what helper uses which options. For example,
    we currently support images in the user description which should not be
    allowed I think:
    
    <details>
      <summary>Profile</summary>
    
    https://try.gitea.io/KN4CK3R
    
    ![grafik](https://github.com/go-gitea/gitea/assets/1666336/109ae422-496d-4200-b52e-b3a528f553e5)
    
    </details>
    KN4CK3R committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    2c2e322 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Configuration menu
    Copy the full SHA
    709ce30 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e418f2 View commit details
    Browse the repository at this point in the history