Matmarex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/61072
Change subject: Remove Wikimedia-specific hack in ParserOutput
......................................................................
Remove Wikimedia-specific hack in ParserOutput
Cleanup after I6a6c12a9. To be merged after appropriate caches are purged.
Change-Id: I849c4bd1fe59e582f9f16789e8b511719e2a5d06
---
M includes/parser/ParserOutput.php
1 file changed, 1 insertion(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/72/61072/1
diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index 29b3500..c5e42a4 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -67,22 +67,8 @@
function getText() {
if ( $this->mEditSectionTokens ) {
- $text = $this->mText;
-
- // If there's old output with misplaced editsections
links cached, mangle it to put them in
- // the right position. We can assume that there is no
'</hN>' inside header tags, making this
- // possible to do with a regex.
- $text = preg_replace(
- // [ this part is like
EDITSECTION_REGEX, but with non-capturing groups ]
- //
note the space here ------v
- '#(<[hH](\d)>)(<(?:mw:)?editsection
page="(?:.*?)" section="(?:.*?)"(?:/>|>(?:.*?)(?:</(?:mw:)?editsection>)))
([\s\S]*?)(</[hH]\2>)#',
- // swap the order of content and editsection
link - $2 is ignored since it's the number in hN's tag name
- '$1$4 $3$5',
- $text
- );
-
return preg_replace_callback(
ParserOutput::EDITSECTION_REGEX,
- array( &$this,
'replaceEditSectionLinksCallback' ), $text );
+ array( &$this,
'replaceEditSectionLinksCallback' ), $this->mText );
}
return preg_replace( ParserOutput::EDITSECTION_REGEX, '',
$this->mText );
}
--
To view, visit https://gerrit.wikimedia.org/r/61072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I849c4bd1fe59e582f9f16789e8b511719e2a5d06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits