Skip to content

Commit 1bb78a0

Browse files
committed
fix test
1 parent 3325e54 commit 1bb78a0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/markup/markdown/markdown.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func render(body []byte, urlPrefix string, metas map[string]string, wikiMarkdown
5252
extension.DefinitionList,
5353
common.FootnoteExtension,
5454
highlighting.NewHighlighting(
55-
highlighting.WithStyle("gitea"),
5655
highlighting.WithFormatOptions(
5756
chromahtml.WithClasses(true),
5857
chromahtml.PreventSurroundingPre(true),

services/gitdiff/gitdiff_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
"code.gitea.io/gitea/modules/git"
1616
"code.gitea.io/gitea/modules/setting"
1717

18+
"gopkg.in/ini.v1"
19+
1820
dmp "github.com/sergi/go-diff/diffmatchpatch"
1921
"github.com/stretchr/testify/assert"
2022
)
@@ -26,6 +28,7 @@ func assertEqual(t *testing.T, s1 string, s2 template.HTML) {
2628
}
2729

2830
func TestDiffToHTML(t *testing.T) {
31+
setting.Cfg = ini.Empty()
2932
assertEqual(t, "foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
3033
{Type: dmp.DiffEqual, Text: "foo "},
3134
{Type: dmp.DiffInsert, Text: "bar"},

0 commit comments

Comments
 (0)