aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/parserTests.inc
diff options
context:
space:
mode:
authorBrion Vibber <brion@users.mediawiki.org>2006-06-06 00:51:34 +0000
committerBrion Vibber <brion@users.mediawiki.org>2006-06-06 00:51:34 +0000
commit939ddd8793c4417b86f21b5ae7a16a9320972b53 (patch)
tree25fa638894c9804a5d9b5b6de86492437357187f /maintenance/parserTests.inc
parent0fb6151c6899e78abf66b01123247a6d2df42b21 (diff)
downloadmediawikicore-939ddd8793c4417b86f21b5ae7a16a9320972b53.tar.gz
mediawikicore-939ddd8793c4417b86f21b5ae7a16a9320972b53.zip
* (bug 2587) Fix for section editing with comment prefix
* (bug 2607) Fix for section editing with mix of wiki and HTML headings * (bug 3342) Fix for section editing with headings wrapped in <noinclude> * (bug 3476) Fix for section editing with faux headings in extensions * (bug 5272) Fix for section editing with HTML-heading subsections * Fix for bogus wiki headings improperly detected with following text * Fix for HTML headings improperly not detected with preceding/following text * Section extraction and replacement functions merged into one implementation on the Parser object, so they can't get out of sync with each other.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/14583
Diffstat (limited to 'maintenance/parserTests.inc')
-rw-r--r--maintenance/parserTests.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc
index 22ddb8d564b7..e8dfb8f69c61 100644
--- a/maintenance/parserTests.inc
+++ b/maintenance/parserTests.inc
@@ -269,9 +269,13 @@ class ParserTest {
$out = $parser->preSaveTransform( $input, $title, $user, $options );
} elseif (preg_match('/\\bmsg\\b/i', $opts)) {
$out = $parser->transformMsg( $input, $options );
- } elseif( preg_match( '/\\bsection=(\d+)\b/', $opts, $matches ) ) {
+ } elseif( preg_match( '/\\bsection=(\d+)\b/i', $opts, $matches ) ) {
$section = intval( $matches[1] );
- $out = Article::getSection( $input, $section );
+ $out = $parser->getSection( $input, $section );
+ } elseif( preg_match( '/\\breplace=(\d+),"(.*?)"/i', $opts, $matches ) ) {
+ $section = intval( $matches[1] );
+ $replace = $matches[2];
+ $out = $parser->replaceSection( $input, $section, $replace );
} else {
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
$out = $output->getText();