mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 09:37:19 +00:00
Add more tests for diff highlighting (#12467)
Adding some more tests for different cases to make sure they keep working Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@ -181,7 +181,7 @@ var (
|
||||
removedCodePrefix = []byte(`<span class="removed-code">`)
|
||||
codeTagSuffix = []byte(`</span>`)
|
||||
)
|
||||
var addSpanRegex = regexp.MustCompile(`<span class="[a-z]*$`)
|
||||
var addSpanRegex = regexp.MustCompile(`<span [class="[a-z]*]*$`)
|
||||
|
||||
func diffToHTML(fileName string, diffs []diffmatchpatch.Diff, lineType DiffLineType) template.HTML {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
|
Reference in New Issue
Block a user