diff options
author | Unknwon <u@gogs.io> | 2017-04-06 17:27:57 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-06 17:27:57 -0400 |
commit | 90b9f7e08ca2e027cc587199537aa653ddd94d91 (patch) | |
tree | 0dbd625cd1eb929250befa07f18a0517ae23a5d1 /pkg/markup/markdown.go | |
parent | 2c404daca612b43bd6b0b720d3e732d9550c0eab (diff) |
pkg/setting: rename {AppUrl, AppSubUrl} -> {AppURL, AppSubURL}
Diffstat (limited to 'pkg/markup/markdown.go')
-rw-r--r-- | pkg/markup/markdown.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/markup/markdown.go b/pkg/markup/markdown.go index 43f58806..741f6f55 100644 --- a/pkg/markup/markdown.go +++ b/pkg/markup/markdown.go @@ -63,7 +63,7 @@ func (r *MarkdownRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) { // Since this method could only possibly serve one link at a time, // we do not need to find all. - if bytes.HasPrefix(link, []byte(setting.AppUrl)) { + if bytes.HasPrefix(link, []byte(setting.AppURL)) { m := CommitPattern.Find(link) if m != nil { m = bytes.TrimSpace(m) @@ -86,14 +86,14 @@ func (r *MarkdownRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) { } index := string(m[i+7 : j]) - fullRepoURL := setting.AppUrl + strings.TrimPrefix(r.urlPrefix, "/") + fullRepoURL := setting.AppURL + strings.TrimPrefix(r.urlPrefix, "/") var link string if strings.HasPrefix(string(m), fullRepoURL) { // Use a short issue reference if the URL refers to this repository link = fmt.Sprintf(`<a href="%s">#%s</a>`, m, index) } else { // Use a cross-repository issue reference if the URL refers to a different repository - repo := string(m[len(setting.AppUrl) : i-1]) + repo := string(m[len(setting.AppURL) : i-1]) link = fmt.Sprintf(`<a href="%s">%s#%s</a>`, m, repo, index) } out.WriteString(link) |