gitea/services/gitdiff
mrsdizzie 9fe4b7b692
Fix error in diff html rendering ()
* Fix error in diff html rendering

Was missing an optional whitespace check in regex. Also noticed a rare case where diff.Type == Equal would be empty and thus get a newline attached. Fixed that too.

Fixes 

* Update services/gitdiff/gitdiff.go

Co-authored-by: zeripath <art27@cantab.net>

* Update gitdiff_test.go

* fmt

Co-authored-by: zeripath <art27@cantab.net>
..
testdata/academic-module Fix panic when diff ()
gitdiff.go Fix error in diff html rendering ()
gitdiff_test.go Fix error in diff html rendering ()
main_test.go Move git diff codes from models to services/gitdiff ()