forked from forgejo/forgejo
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:
parent
a4ba1ad5ed
commit
73b155d5f2
2 changed files with 16 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue