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

Fix broken code editor diff preview (#23307) #23320

Merged
merged 3 commits into from
Mar 6, 2023

Commits on Mar 6, 2023

  1. Fix broken code editor diff preview (go-gitea#23307)

    Close go-gitea#23265, the code editor diff preview has been broken for long
    time.
    
    * Fix the regression for `data-line-num`
        * `.code-diff` is necessary to show the line number
    * Fix the regression for go-gitea#12434
    * The diff:
    [12434](https://github.com/go-gitea/gitea/pull/12434/files?diff=unified&w=1)
        * It hides the Type(4) (aka HunkHeader)  for unexpected cases.
    
    
    Diff with ignoring whitespaces:
    https://github.com/go-gitea/gitea/pull/23307/files?diff=unified&w=1
    
    Before: see the issue go-gitea#23265
    
    After:
    
    ![image](https://user-images.githubusercontent.com/2114189/222942810-286dc9af-0b39-4e9d-8585-8c299b881241.png)
    wxiaoguang authored and GiteaBot committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    db8e79a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3980f69 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d83ec96 View commit details
    Browse the repository at this point in the history