-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Full-file syntax highlighting for diff pages #33766
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
1955475
initial pass at fixing multiline comment highlighting in git diffs
dfirebaugh 0452d27
updating tests since diffwithhighlight is now only responsible for pl…
dfirebaugh 60898a6
adding language var back
dfirebaugh a180f0f
Merge remote-tracking branch 'upstream/main' into git-diff-highlights
dfirebaugh aac3ec4
updating tests
dfirebaugh 68dd510
- making highlighted code members private
dfirebaugh 3607a25
after make fmt
dfirebaugh 843cb3d
implementing lint suggestion
dfirebaugh 0eaefbc
- removing filename and language from `diffWithHighlight` func
dfirebaugh 9a59d9a
reverting span close logic
dfirebaugh 5b0adf2
updating `highlightdiff_test.go` test data
dfirebaugh 447236e
- readding call to `highligh.Code` in `diffWithHighlight`
dfirebaugh 09dc97b
- calling `template.HTMLEscapeString` directly in `diffWithHighlight`…
dfirebaugh 14d6c0e
reverting htmlescape because we already escape it when we highlight t…
dfirebaugh d42de12
- reverting original hunk-based syntax highlighting
dfirebaugh 6aa9099
temp: simplify code
wxiaoguang 8bb9de4
temp: add highlight fallback and FIXME comment
wxiaoguang 44c2766
Merge branch 'main' into git-diff-highlights
wxiaoguang 1e6c8dd
add FIXME for abused GitDiff
wxiaoguang e424efe
Merge branch 'main' into git-diff-highlights
wxiaoguang 493e32b
fix merge
wxiaoguang abc63e9
fix DiffFile struct
wxiaoguang 7de148a
split GetDiff
wxiaoguang 0a29d4d
only save the highlighted lines we need, but not the whole file, to s…
wxiaoguang d786956
fix tests
wxiaoguang ba96e9f
fix test & lint
wxiaoguang 7fffde1
Update services/gitdiff/gitdiff.go
wxiaoguang 632ea32
improve test
wxiaoguang a07ca6a
Merge branch 'main' into git-diff-highlights
wxiaoguang 7939850
Merge branch 'main' into git-diff-highlights
wxiaoguang b2dbc78
fix 500 in blob_excerpt
wxiaoguang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.