From 90b9f7e08ca2e027cc587199537aa653ddd94d91 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 6 Apr 2017 17:27:57 -0400 Subject: pkg/setting: rename {AppUrl, AppSubUrl} -> {AppURL, AppSubURL} --- pkg/markup/markdown.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/markup/markdown.go') 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(`#%s`, 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(`%s#%s`, m, repo, index) } out.WriteString(link) -- cgit v1.2.3