From 5cd887dba5dea90470435bfa338b70c5c036019e Mon Sep 17 00:00:00 2001 From: Peter Smit Date: Mon, 9 Feb 2015 12:56:46 +0200 Subject: [PATCH 1/9] Fixes #921 Fixes #921 and makes the Mention regexp be in line with the others --- modules/base/markdown.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/base/markdown.go b/modules/base/markdown.go index b5f397dce..4a7adc8a4 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -106,7 +106,7 @@ func (options *CustomRender) Image(out *bytes.Buffer, link []byte, title []byte, } var ( - MentionPattern = regexp.MustCompile(`((^|\s)@)[0-9a-zA-Z_]{1,}`) + MentionPattern = regexp.MustCompile(`(\s|^)@[0-9a-zA-Z_]+`) 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]+`) @@ -128,8 +128,9 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte { if !inCodeBlock && !bytes.HasPrefix(line, tab) { ms := MentionPattern.FindAll(line, -1) for _, m := range ms { + m = bytes.TrimSpace(m) line = bytes.Replace(line, m, - []byte(fmt.Sprintf(`%s`, setting.AppSubUrl, m[2:], m)), -1) + []byte(fmt.Sprintf(`%s`, setting.AppSubUrl, m[1:], m)), -1) } } From 7d3932b9cd1c66f9da577aa666f593d15e4ced99 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 9 Feb 2015 11:04:17 -0500 Subject: [PATCH 2/9] templates/ng/base: change year to 2015, fix #928 - conf/locale: update Japanese locale --- conf/locale/locale_ja-JP.ini | 4 ++-- gogs.go | 2 +- templates/.VERSION | 2 +- templates/ng/base/footer.tmpl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/locale/locale_ja-JP.ini b/conf/locale/locale_ja-JP.ini index c8b70aa1c..29ea94e4d 100755 --- a/conf/locale/locale_ja-JP.ini +++ b/conf/locale/locale_ja-JP.ini @@ -516,8 +516,8 @@ dashboard.git_gc_repos=リポジトリでのガベージコレクションを実 dashboard.git_gc_repos_success=すべてのリポジトリは正常にガベージ コレクションを行いました。 dashboard.resync_all_sshkeys='.ssh/ autorized_key' ファイルを再生成します。(警告:Gogsキー以外は失われます) dashboard.resync_all_sshkeys_success=すべての公開鍵が正常に書き換えられました。 -dashboard.resync_all_update_hooks=Rewrite all update hook of repositories (needed when custom config path is changed) -dashboard.resync_all_update_hooks_success=All repositories' update hook have been rewritten successfully. +dashboard.resync_all_update_hooks=リポジトリの update フックをすべて再更新する(カスタムの設定パスが変更されたときに必要) +dashboard.resync_all_update_hooks_success=リポジトリの update フックがすべて正常に再更新されました。 dashboard.server_uptime=サーバーの稼働時間 dashboard.current_goroutine=現在のGoroutine diff --git a/gogs.go b/gogs.go index 6edf316f8..099039171 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.13.0208 Beta" +const APP_VER = "0.5.13.0209 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/templates/.VERSION b/templates/.VERSION index a896ddd33..1f077fbfc 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.13.0208 Beta \ No newline at end of file +0.5.13.0209 Beta \ No newline at end of file diff --git a/templates/ng/base/footer.tmpl b/templates/ng/base/footer.tmpl index 734533a10..e152a4ded 100644 --- a/templates/ng/base/footer.tmpl +++ b/templates/ng/base/footer.tmpl @@ -1,7 +1,7 @@