s{\b (https?)://\S+ }{[$1]}gmsx; # url
s{(?: < | \A ) [^@>\s]+ @ [^>]+ (?: > | \Z )}{<...>}igmsx; # address
s{\b [0-9]+ \b}{[num]}gmsx; # number
- s{\b I? [0-9a-f]{40} \b}{[sha1]}gmsx; # hash
+ s{\b [Ig]? [0-9a-f]{ 40} \b}{[sha1]}gmsx; # hash
+ s{\b [Ig]? [0-9a-f]{6,40} \b}{[hash]}gmsx; # abbrev
}
}
when (['all', 'contents']) {