Check for whitespace around changeid searches
If a URL contains a change ID such as http://example.org/change/123abc456/log.html then the changeid regex matches the id and tries to turn it into a link like: http://example.org/change/<a href="#q,123abc456,n,z">123abc456</a>/log.html which clearly breaks the original URL. To fix we should check for whitespace or periods around the changeid in the comment. Also, check for <p> tags that gerrit adds to comments for us. Change-Id: Ia337ddfe2ddc82c858072135a613786070f0dc67
This commit is contained in:
parent
c9b7fc001b
commit
75982db59b
@ -128,8 +128,8 @@ class openstack_project::gerrit (
|
||||
commentlinks => [
|
||||
{
|
||||
name => 'changeid',
|
||||
match => '(I?[0-9a-f]{8,40})',
|
||||
link => '#q,$1,n,z',
|
||||
match => '(<p>|[\\s]+)(I?[0-9a-f]{7,40})(</p>|[\\s.]+)',
|
||||
html => '$1<a href=\"#q,$2,n,z\">$2</a>$3',
|
||||
},
|
||||
{
|
||||
name => 'bugheader',
|
||||
|
Loading…
x
Reference in New Issue
Block a user