aboutsummaryrefslogtreecommitdiffstats
path: root/services/gitdiff/highlightdiff_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Enable testifylint rules (#34075)TheFox0x72025-03-311-3/+3
| | | | enable testifylint rules disabled in: https://github.com/go-gitea/gitea/pull/34054
* Fix material icon & diff highlight (#33844)wxiaoguang2025-03-101-0/+10
|
* Full-file syntax highlighting for diff pages (#33766)Dustin Firebaugh2025-03-091-93/+44
| | | | | | | | | | | | Fix #33358, fix #21970 This adds a step in the `GitDiffForRender` that does syntax highlighting for the entire file and then only references lines from that syntax highlighted code. This allows things like multi-line comments to be syntax highlighted correctly. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Upgrade chroma to v2.3.0 (#21259)silverwind2022-09-261-3/+3
| | | | | | | | | | | | | The behaviour of `PreventSurroundingPre` has changed in https://github.com/alecthomas/chroma/pull/618 so that apparently it now causes line wrapper tags to be no longer emitted, but we need some form of indication to split the HTML into lines, so I did what https://github.com/yuin/goldmark-highlighting/pull/33 did and added the `nopWrapper`. Maybe there are more elegant solutions but for some reason, just splitting the HTML string on `\n` did not work. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve code diff highlight, fix incorrect rendered diff result (#19958)wxiaoguang2022-07-231-0/+126
Use Unicode placeholders to replace HTML tags and HTML entities first, then do diff, then recover the HTML tags and HTML entities. Now the code diff with highlight has stable behavior, and won't emit broken tags.