From: umherirrender Date: Thu, 13 Mar 2014 17:55:40 +0000 (+0100) Subject: Adjust magic bolding in api help to only match lines inside * X-Git-Tag: 1.31.0-rc.0~16632^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22calendrier%22%2C%22type=semaine%22%29%20.%20%22?a=commitdiff_plain;h=cc10e13612c1d530ab531e5979e142f3f66fc72c;p=lhc%2Fweb%2Fwiklou.git Adjust magic bolding in api help to only match lines inside * list=logevents&leaction has param values with *, which gets bold, when there was two of them in the same line. Bug: 61834 Change-Id: Idace9afd4f3a2dce9be539b209a02fa318df8f45 --- diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 49a02feff7..3c924bc698 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -275,8 +275,8 @@ See the complete documentation, // identify requests to api.php $text = preg_replace( '#^(\s*)(api\.php\?[^ <\n\t]+)$#m', '\1\2', $text ); if ( $this->mHelp ) { - // make strings inside * bold - $text = preg_replace( "#\\*[^<>\n]+\\*#", '\\0', $text ); + // make lines inside * bold + $text = preg_replace( '#^(\s*)(\*[^<>\n]+\*)(\s*)$#m', '$1$2$3', $text ); } // Armor links (bug 61362)