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:
mrsdizzieandtechknowlogick authored and GitHub committed 2020-08-11 00:29:25 -04:00
1 parent a4ba1ad5ed
commit 73b155d5f2
2 files changed
+16 -1

No files matched your search

+1 -1
View File
@@ -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)