mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-24 18:56:11 +01:00
89845f6728
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
|
||
---|---|---|
.. | ||
auth | ||
avatar | ||
base | ||
context | ||
cron | ||
highlight | ||
httplib | ||
indexer | ||
lfs | ||
log | ||
mailer | ||
markdown | ||
markup | ||
minwinsvc | ||
notification | ||
options | ||
private | ||
process | ||
public | ||
setting | ||
ssh | ||
sync | ||
templates | ||
user | ||
util | ||
validation |