www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Nalley (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (INFRA-7862) Hilite r123456 as links when followed by comma or ')'.
Date Mon, 03 Nov 2014 19:38:33 GMT

     [ https://issues.apache.org/jira/browse/INFRA-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Nalley updated INFRA-7862:
--------------------------------
    Assignee: Mark Thomas

> Hilite r123456 as links when followed by comma or ')'.
> ------------------------------------------------------
>
>                 Key: INFRA-7862
>                 URL: https://issues.apache.org/jira/browse/INFRA-7862
>             Project: Infrastructure
>          Issue Type: Improvement
>          Components: Bugzilla
>            Reporter: Konstantin Kolinko
>            Assignee: Mark Thomas
>            Priority: Minor
>         Attachments: Template.pm.patch
>
>
> Look at the following issue as an example:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56582
> I want the text such as "r1599385, " and "r1599395)" to be converted into links to ViewVC.
Currently they are displayed as plain text.
> Looking into /infrastructure/bugzilla/bugzilla/ and searching for places that use "svn_url"
configuration parameter,  I think the following file is responsible for this feature:
>  Bugzilla/Template.pm
> It contains the following regexp:
> >    # Subversion revision links of the form r123456
> >    $text =~ s~\b((?<!-|\.)r(\d+))(?=\.?($|\s))
> I interpret it [1] as
> - World boundary
> - "(?<!pattern)" is a zero-width negative look-behind assertion
>  that previous character is not '-' or '.'.
> - "r" + digits are captured as $1
> - digits are captured as $2
> - "(?=pattern)" is a zero-width positive look-ahead assertion
>  that the text is followed by optional '.' followed by either end-of-line or whitespace.
> I propose to change the look-ahead part of that regexp to be the following:
> (?=(\.|\,)?($|\s|\)))
> That should mean:
> - optional point or comma followed by either end-of-line, whitespace or ')'.
> There is also similar regular expression in Bugzilla/BugMail.pm, but as I have never
seen e-mails with such links from Bugzilla, I think that BugMail.pm is not worth being changed.
Changing BugMail.pm would also be more risky, as e-mails are archived, as opposed to on-line
display.
> [1] http://perldoc.perl.org/perlre.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message