diff options
author | Unknwon <u@gogs.io> | 2017-04-06 17:13:53 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-06 17:13:53 -0400 |
commit | 0e271799f2ec744332761cd87fe0d96f4d9653e0 (patch) | |
tree | a49a9609b8b37e972a60b505b2e3900922e55497 /pkg/markup | |
parent | 3c0de1713367ffecfe4606ad0553a550f568e74d (diff) |
Refactoring: rename and simplify pkg/tool functions
Diffstat (limited to 'pkg/markup')
-rw-r--r-- | pkg/markup/markdown.go | 2 | ||||
-rw-r--r-- | pkg/markup/markup.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/markup/markdown.go b/pkg/markup/markdown.go index fc2f54c6..43f58806 100644 --- a/pkg/markup/markdown.go +++ b/pkg/markup/markdown.go @@ -72,7 +72,7 @@ func (r *MarkdownRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) { if j == -1 { j = len(m) } - out.WriteString(fmt.Sprintf(` <code><a href="%s">%s</a></code>`, m, tool.ShortSha(string(m[i+7:j])))) + out.WriteString(fmt.Sprintf(` <code><a href="%s">%s</a></code>`, m, tool.ShortSHA1(string(m[i+7:j])))) return } diff --git a/pkg/markup/markup.go b/pkg/markup/markup.go index 98742540..c5549b6c 100644 --- a/pkg/markup/markup.go +++ b/pkg/markup/markup.go @@ -140,7 +140,7 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte { if com.StrTo(m).MustInt() > 0 { return m } - return fmt.Sprintf(`<a href="%s/commit/%s"><code>%s</code></a>`, urlPrefix, m, tool.ShortSha(string(m))) + return fmt.Sprintf(`<a href="%s/commit/%s"><code>%s</code></a>`, urlPrefix, m, tool.ShortSHA1(string(m))) })) } |