Description
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 the inserted
code part. But because of certain set of conditions we're not fixing all broken spans in this case.
Gitea Version
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
N/A
Screenshots
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