r85839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85838‎ | r85839 | r85840 >
Date:00:11, 12 April 2011
Author:tstarling
Status:ok
Tags:
Comment:
* Use qr{...} instead of qr~...~ so that vim syntax highlighting works
* Fix for bug 28490 (brackets around wikilinks in bugzilla gone). Committing for test on server.
Modified paths:
  • /trunk/tools/bugzilla/bugzilla-4.0/extensions/Wikimedia/Extension.pm (modified) (history)

Diff [purge]

Index: trunk/tools/bugzilla/bugzilla-4.0/extensions/Wikimedia/Extension.pm
@@ -39,11 +39,11 @@
4040 my $regexes = $args->{'regexes'};
4141 my $text = $args->{'text'};
4242 my $replacerWP = {
43 - match => qr~\[\[([a-zA-Z0-9_ ,./'()!#%:\x80-\xff-]+)\]\]~,
 43+ match => qr{\[\[([a-zA-Z0-9_ ,./'()!#%:\x80-\xff-]+)\]\]},
4444 replace => \&_createWikipediaLink
4545 };
4646 my $replacerCR = {
47 - match => qr~r(\d+)~,
 47+ match => qr{r(\d+)},
4848 replace => \&_createCodeReviewLink
4949 };
5050 #~\br(\d+)\b
@@ -58,7 +58,7 @@
5959 sub _createWikipediaLink {
6060 my $match_str = $1;
6161 my $tmp = html_quote($match_str);
62 - my $wikipedia_link = "<a href=\"http://en.wikipedia.org/wiki/$tmp\">$tmp</a>";
 62+ my $wikipedia_link = "[[<a href=\"http://en.wikipedia.org/wiki/$tmp\">$tmp</a>]]";
6363 return $wikipedia_link;
6464 };
6565

Status & tagging log