mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 10:07:22 +00:00
Refactor markup code (#31399)
1. use clearer names 2. remove deadcode 3. avoid name shadowing 4. eliminate some lint warnings
This commit is contained in:
@ -144,17 +144,6 @@ func TestRender_CrossReferences(t *testing.T) {
|
||||
`<p><a href="`+inputURL+`" rel="nofollow"><code>0123456789/foo.txt (L2-L3)</code></a></p>`)
|
||||
}
|
||||
|
||||
func TestMisc_IsSameDomain(t *testing.T) {
|
||||
setting.AppURL = markup.TestAppURL
|
||||
|
||||
sha := "b6dd6210eaebc915fd5be5579c58cce4da2e2579"
|
||||
commit := util.URLJoin(markup.TestRepoURL, "commit", sha)
|
||||
|
||||
assert.True(t, markup.IsSameDomain(commit))
|
||||
assert.False(t, markup.IsSameDomain("http://google.com/ncr"))
|
||||
assert.False(t, markup.IsSameDomain("favicon.ico"))
|
||||
}
|
||||
|
||||
func TestRender_links(t *testing.T) {
|
||||
setting.AppURL = markup.TestAppURL
|
||||
|
||||
|
Reference in New Issue
Block a user