go-gitea/modules
Lunny Xiao 1709297701 Fix SHA1 hash linking (#2143) (#2293)
This changes the regex to look for a hash from 7 to 40 characters,
to match the use of abbreviated hash lookups in both git and github.
The restriction of not being a pure number is also removed because
1234567 is now considered a valid abbreviated hash, as is deadbeef.

A note has been added to the top of the code to state that the
literal regex match is fine, but no extra validation is currently
performed so some false positives are expected.

A future change could ensure that the hash exists in the repository
before rendering it as a link, although this might incur a slight
performance penalty.

Reverts part of commit 4a46613 and fixes #2053.
2017-08-12 09:32:56 +08:00
..
auth fix: gofmt errors. (#1106) 2017-03-03 16:21:31 +08:00
avatar Use assert in legacy unit tests (#867) 2017-02-08 14:29:07 +08:00
base Don't ignore gravatar error (#2138) 2017-07-11 01:00:43 -05:00
context Fix PR template error 2017-06-18 22:01:20 -04:00
cron Implement archive cleanup (#885) 2017-02-11 12:00:46 +08:00
highlight Integrate templates into bindata optionally (#314) 2016-12-06 18:58:31 +01:00
httplib add ProxyFromEnvironment if none set (#1096) 2017-03-02 08:36:42 +08:00
indexer Search bar for issues/pulls (#530) 2017-01-25 10:43:02 +08:00
lfs refactor: Remove unnecessary type conversions (#772) 2017-01-27 23:03:32 +08:00
log fix panic when push but the only log mode console is disabled by serv and update commands (#1007) 2017-02-22 19:44:51 +08:00
mailer Cleanup log messaging 2017-02-02 15:24:18 +01:00
markdown Fix SHA1 hash linking (#2143) (#2293) 2017-08-12 09:32:56 +08:00
minwinsvc Fix Git hooks not being executed on Windows when running as a service (#1149) 2017-03-09 09:27:43 +08:00
notification Notification - Step 1 (#523) 2016-12-31 00:44:54 +08:00
options Add default values for settings (#455) 2016-12-23 15:18:05 +08:00
process Refactor process package and introduce ProcessManager{} with tests (#75) 2017-01-17 13:58:58 +08:00
public Allow custom public files (#782) 2017-01-28 23:14:56 +01:00
setting refactor: remove redundant slash. (#1109) 2017-03-03 20:47:24 +08:00
ssh Cleanup log messaging 2017-02-02 15:24:18 +01:00
sync Add missing copyright header to status table test (#902) 2017-02-11 17:53:47 +08:00
templates [backport] fix sanitation (#1646) 2017-04-30 17:55:16 +08:00
user golint fixed for modules/user 2016-11-24 17:37:11 +08:00
util Search bar for issues/pulls (#530) 2017-01-25 10:43:02 +08:00