From 0e271799f2ec744332761cd87fe0d96f4d9653e0 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 6 Apr 2017 17:13:53 -0400 Subject: Refactoring: rename and simplify pkg/tool functions --- pkg/markup/markdown.go | 2 +- pkg/markup/markup.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/markup') 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(` %s`, m, tool.ShortSha(string(m[i+7:j])))) + out.WriteString(fmt.Sprintf(` %s`, 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(`%s`, urlPrefix, m, tool.ShortSha(string(m))) + return fmt.Sprintf(`%s`, urlPrefix, m, tool.ShortSHA1(string(m))) })) } -- cgit v1.2.3