mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 18:03:59 +01:00
Refactor some Str2html code (followup)
* [BUG] Restrict when to make link absolute in markdown
This commit is contained in:
parent
68099f2f00
commit
58bc3af08d
1 changed files with 2 additions and 2 deletions
|
@ -742,7 +742,7 @@ Citation needed[^0].`,
|
|||
for _, test := range testcases {
|
||||
res, err := markdown.RenderString(&markup.RenderContext{Ctx: git.DefaultContext}, test.testcase)
|
||||
assert.NoError(t, err, "Unexpected error in testcase: %q", test.testcase)
|
||||
assert.Equal(t, test.expected, res, "Unexpected result in testcase %q", test.testcase)
|
||||
assert.Equal(t, test.expected, string(res), "Unexpected result in testcase %q", test.testcase)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1189,7 +1189,7 @@ func TestCustomMarkdownURL(t *testing.T) {
|
|||
},
|
||||
}, input)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer))
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(string(buffer)))
|
||||
}
|
||||
|
||||
test("[test](abp:subscribe?location=https://codeberg.org/filters.txt&title=joy)",
|
||||
|
|
Loading…
Reference in a new issue