Revert r41710, r41978, r42012, r42048 (integration of Poem extension to core plus...
authorChad Horohoe <demon@users.mediawiki.org>
Sat, 15 Nov 2008 01:19:46 +0000 (01:19 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sat, 15 Nov 2008 01:19:46 +0000 (01:19 +0000)
CREDITS
RELEASE-NOTES
includes/parser/Parser.php
maintenance/parserTests.txt

diff --git a/CREDITS b/CREDITS
index 6c0a676..e4c545d 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -56,7 +56,6 @@ following names for their contribution to the product.
 * Michael De La Rue
 * Mike Horvath
 * Mormegil
-* Nathaniel Herman
 * Nathan Larson
 * Nikolaos S. Karastathis
 * Paul Copperman
index 50df753..5ed09d1 100644 (file)
@@ -70,7 +70,6 @@ The following extensions are migrated into MediaWiki 1.14:
 * Special:LinkSearch to search for external links (was extension LinkSearch)
 * RenderHash
 * NoMoveUserPages
-* Poem (patch by Nathaniel Herman)
 * UniversalEditButton
 
 === New features in 1.14 ===
index 7fc3a88..fe016a8 100644 (file)
@@ -128,7 +128,7 @@ class Parser
                $this->mTransparentTagHooks = array();
                $this->mFunctionHooks = array();
                $this->mFunctionSynonyms = array( 0 => array(), 1 => array() );
-               $this->mDefaultStripList = $this->mStripList = array( 'nowiki', 'gallery', 'poem' );
+               $this->mDefaultStripList = $this->mStripList = array( 'nowiki', 'gallery' );
                $this->mUrlProtocols = wfUrlProtocols();
                $this->mExtLinkBracketedRegex = '/\[(\b(' . wfUrlProtocols() . ')'.
                        '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x0a\\x0d]*?)\]/S';
@@ -3317,9 +3317,6 @@ class Parser
                                case 'gallery':
                                        $output = $this->renderImageGallery( $content, $attributes );
                                        break;
-                               case 'poem':
-                                       $output = $this->renderPoem( $content, $attributes );
-                                       break;
                                default:
                                        if( isset( $this->mTagHooks[$name] ) ) {
                                                # Workaround for PHP bug 35229 and similar
@@ -4190,45 +4187,6 @@ class Parser
                return $ig->toHTML();
        }
 
-       /** Renders any text in between <poem></poem> tags
-        * based on http://www.mediawiki.org/wiki/Extension:Poem
-        */
-
-       function renderPoem( $in, $param = array() ) {
-
-               /* using newlines in the text will cause the parser to add <p> tags,
-               * which may not be desired in some cases
-               */
-               $nl = array_key_exists( 'compact', $param ) ? '' : "\n";
-  
-               $replacer = new DoubleReplacer( ' ', '&nbsp;' );
-               $text = $this->recursiveTagParse( $in );
-               $text = $this->mStripState->unstripNoWiki( $text );
-               // Only strip the very first and very last \n (which trim cannot do)
-               if( substr( $text, 0, 1 ) == "\n" )
-                       $text = substr( $text, 1 );
-               if( substr( $text, -1 ) == "\n" )
-                       $text = substr( $text, 0, -1 );
-               
-               $text = str_replace( "\n", "<br />\n", $text );
-               $text = preg_replace_callback(
-                       "/^( +)/m",
-                       $replacer->cb(),
-                       $text );
-
-               // Pass HTML attributes through to the output.
-               $attribs = Sanitizer::validateTagAttributes( $param, 'div' );
-
-               // Wrap output in a <div> with "poem" class.
-               if( array_key_exists( 'class', $attribs ) ) {
-                       $attribs['class'] = 'poem ' . $attribs['class'];
-               } else {
-                       $attribs['class'] = 'poem';
-               }
-
-               return Xml::openElement( 'div', $attribs ) . $nl . trim( $text ) . $nl . Xml::closeElement( 'div' );
-       }
-
        function getImageParams( $handler ) {
                if ( $handler ) {
                        $handlerClass = get_class( $handler );
index 34666b9..06242c5 100644 (file)
@@ -7166,117 +7166,6 @@ language=fa
 </p>
 !! end
 
-!!test
-<poem>
-!!input
-<poem>
-this
-is
-a
-test
-</poem>
-!!result
-<div class="poem">
-<p>this<br />
-is<br />
-a<br />
-test
-</p>
-</div>
-
-!!end
-
-!!test
-  <poem> with recursive parsing
-!!input
-<poem>
-this ''is'' a '''test'''
-</poem>
-!! result
-<div class="poem">
-<p>this <i>is</i> a <b>test</b>
-</p>
-</div>
-
-!!end
-
-
-!!test
-  <poem> with leading whitespace
-!!input
-<poem>
-
-   test
-
-</poem>
-!!result
-<div class="poem">
-<p><br />
-&nbsp;&nbsp;&nbsp;test<br />
-</p>
-</div>
-
-!!end
-
-!!test
-Horizontal rule
-!!input
-<poem>
-some
------
-text
-</poem>
-!!result
-<div class="poem">
-<p>some<br />
-</p>
-<hr /><br />
-<p>text
-</p>
-</div>
-
-!!end
-
-!!test
-  nested <poem><nowiki>
-!!input
-<poem><nowiki>
-this
-is
-a
-test
-</nowiki></poem>
-!!result
-<div class="poem">
-<p>this<br />
-is<br />
-a<br />
-test
-</p>
-</div>
-
-!!end
-
-!!test
-  nested <poem><nowiki> with formatting
-!!input
-<poem><nowiki>
-this
-'''is'''
-a
-test
-</nowiki></poem>
-!!result
-<div class="poem">
-<p>this<br />
-'''is'''<br />
-a<br />
-test
-</p>
-</div>
-
-!! end
-
 #
 #
 #