-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix highlight problem of git diff #24336
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
Conversation
related go-gitea#23176 try fix it with @silverwind solution in go-gitea#23176 (comment) looks the result is good. but looks it will cost to much memorry when the file is large. maybe limt the max file size? Signed-off-by: a1012112796 <[email protected]>
Hmm yes, full file highlight is expensive. Might need a option for max line count after which to fall back to the cheap method. Kind of similar to |
Signed-off-by: a1012112796 <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
no change about algorithm. but render full file instead of render it line by line. ref: #23176 (comment) |
I mean , does the old style diff still work? This feature is pretty useful. |
Oh, I see. sorry, I forgot it, will fix it later. |
Signed-off-by: a1012112796 <[email protected]>
@wxiaoguang fixed 4362fa6 |
Signed-off-by: a1012112796 <[email protected]>
Haven't looked into details, some quick thoughts after a quick review:
|
I'd like try some refactor to make |
Any updates on this PR? |
Replaced by Syntax highlighting should be full-file only #33766, no hacky approach. |
related #23176
try fix it with @silverwind solution in #23176 (comment)
looks the result is good. but looks it will cost to much memorry when the file is large. maybe limt the max file size?