You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when Gitea is highlighting a diff, it's possible that not all code is correctly "diffed", this means that part of added code isn't included in the added-code span, but rather outside of it.
This is caused by broken spans! Gitea is diffing the code after it has been highlighted by chroma. This means we're diffing with HTML code, this causes that certain HTML elements are being split apart from each other, one part could live in the "equal" part and the other part in the "insert" this causes Broken spans, @zeripath has made a excellent attempt at fixing most cases of this broken spans, but there are still cases where this code fails to fix the broken spans:
You can clearly see here that the ), xdg' part also should be included into the inserted code part. But because of certain set of conditions we're not fixing all broken spans in this case.
Description
Currently when Gitea is highlighting a diff, it's possible that not all code is correctly "diffed", this means that part of added code isn't included in the
added-code
span, but rather outside of it.This is caused by broken spans! Gitea is diffing the code after it has been highlighted by chroma. This means we're diffing with HTML code, this causes that certain HTML elements are being split apart from each other, one part could live in the "equal" part and the other part in the "insert" this causes Broken spans, @zeripath has made a excellent attempt at fixing most cases of this broken spans, but there are still cases where this code fails to fix the broken spans:
https://try.gitea.io/Gusted/Test-repo/pulls/3/files
You can clearly see here that the
), xdg'
part also should be included into theinserted
code part. But because of certain set of conditions we're not fixing all broken spans in this case.Gitea Version
03eba32
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
N/A
Screenshots
Actual:
Expected:
Git Version
N/A
Operating System
N/A
How are you running Gitea?
https://try.gitea.io/Gusted/Test-repo/pulls/3/files
Database
No response
The text was updated successfully, but these errors were encountered: