Revision: 43520
Author:   demon
Date:     2008-11-15 01:19:46 +0000 (Sat, 15 Nov 2008)

Log Message:
-----------
Revert r41710, r41978, r42012, r42048 (integration of Poem extension to core 
plus misc. fixes). Per Wikitech-l, this isn't properly attributed to the 
original authors of the extension. Furthermore, "Poem" is entirely too narrow a 
name for the functionality this tag provides. If this is to be integrated, a 
better name should be chosen.

Modified Paths:
--------------
    trunk/phase3/CREDITS
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/parser/Parser.php
    trunk/phase3/maintenance/parserTests.txt

Modified: trunk/phase3/CREDITS
===================================================================
--- trunk/phase3/CREDITS        2008-11-15 01:19:37 UTC (rev 43519)
+++ trunk/phase3/CREDITS        2008-11-15 01:19:46 UTC (rev 43520)
@@ -56,7 +56,6 @@
 * Michael De La Rue
 * Mike Horvath
 * Mormegil
-* Nathaniel Herman
 * Nathan Larson
 * Nikolaos S. Karastathis
 * Paul Copperman

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2008-11-15 01:19:37 UTC (rev 43519)
+++ trunk/phase3/RELEASE-NOTES  2008-11-15 01:19:46 UTC (rev 43520)
@@ -70,7 +70,6 @@
 * Special:LinkSearch to search for external links (was extension LinkSearch)
 * RenderHash
 * NoMoveUserPages
-* Poem (patch by Nathaniel Herman)
 * UniversalEditButton
 
 === New features in 1.14 ===

Modified: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php     2008-11-15 01:19:37 UTC (rev 
43519)
+++ trunk/phase3/includes/parser/Parser.php     2008-11-15 01:19:46 UTC (rev 
43520)
@@ -128,7 +128,7 @@
                $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 @@
                                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 @@
                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 );

Modified: trunk/phase3/maintenance/parserTests.txt
===================================================================
--- trunk/phase3/maintenance/parserTests.txt    2008-11-15 01:19:37 UTC (rev 
43519)
+++ trunk/phase3/maintenance/parserTests.txt    2008-11-15 01:19:46 UTC (rev 
43520)
@@ -7166,117 +7166,6 @@
 </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
-
 #
 #
 #



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to