From 9f74e2c9de2d75564116a93756f8d705ff34a6d8 Mon Sep 17 00:00:00 2001 From: Dennis Smurf Date: Fri, 28 Nov 2014 11:22:38 +0100 Subject: [PATCH] sha1CurrentPattern changes to 40 instead of range [5,40] --- modules/base/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/base/markdown.go b/modules/base/markdown.go index 57676ed70..1c10a4916 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -104,7 +104,7 @@ var ( commitPattern = regexp.MustCompile(`(\s|^)https?.*commit/[0-9a-zA-Z]+(#+[0-9a-zA-Z-]*)?`) issueFullPattern = regexp.MustCompile(`(\s|^)https?.*issues/[0-9]+(#+[0-9a-zA-Z-]*)?`) issueIndexPattern = regexp.MustCompile(`#[0-9]+`) - sha1CurrentPattern = regexp.MustCompile(`\b[0-9a-f]{5,40}\b`) + sha1CurrentPattern = regexp.MustCompile(`\b[0-9a-f]{40}\b`) ) func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte {