dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Linker: Document parseComment() as returning HTML
[lhc/web/wiklou.git]
/
includes
/
Linker.php
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
0ee6c92
..
a3fba83
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-1076,10
+1076,6
@@
class Linker {
* @author Erik Moeller <moeller@scireview.de>
* @since 1.16.3. $wikiId added in 1.26
*
* @author Erik Moeller <moeller@scireview.de>
* @since 1.16.3. $wikiId added in 1.26
*
- * Note: there's not always a title to pass to this function.
- * Since you can't set a default parameter for a reference, I've turned it
- * temporarily to a value pass. Should be adjusted further. --brion
- *
* @param string $comment
* @param Title|null $title Title object (to generate link to the section in autocomment)
* or null
* @param string $comment
* @param Title|null $title Title object (to generate link to the section in autocomment)
* or null
@@
-1087,7
+1083,7
@@
class Linker {
* @param string|null $wikiId Id (as used by WikiMap) of the wiki to generate links to.
* For use with external changes.
*
* @param string|null $wikiId Id (as used by WikiMap) of the wiki to generate links to.
* For use with external changes.
*
- * @return
mixed|string
+ * @return
string HTML
*/
public static function formatComment(
$comment, $title = null, $local = false, $wikiId = null
*/
public static function formatComment(
$comment, $title = null, $local = false, $wikiId = null
@@
-1221,6
+1217,7
@@
class Linker {
return preg_replace_callback(
'/
\[\[
return preg_replace_callback(
'/
\[\[
+ \s*+ # ignore leading whitespace, the *+ quantifier disallows backtracking
:? # ignore optional leading colon
([^\]|]+) # 1. link target; page names cannot include ] or |
(?:\|
:? # ignore optional leading colon
([^\]|]+) # 1. link target; page names cannot include ] or |
(?:\|