Revert r52983 for now, could cause unexpected syntax interactions, we want to investi...
authorAndrew Garrett <werdna@users.mediawiki.org>
Thu, 27 Aug 2009 17:16:15 +0000 (17:16 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Thu, 27 Aug 2009 17:16:15 +0000 (17:16 +0000)
RELEASE-NOTES
includes/parser/Parser.php
maintenance/parserTests.txt

index e7637a7..e8caad0 100644 (file)
@@ -136,7 +136,6 @@ this. Was used when mwEmbed was going to be an extension.
 * Added a feature to allow per-article process pool size control for the parsing 
   task, to limit resource usage when the cache for a heavily-viewed article is
   invalidated. Requires an external daemon. 
-* Leading > is now syntax for <blockquote>.
 * (bug 19576) Moved the id attribues from the anchors accompanying section
   headers to the <span class="mw-headline"> elements within the section headers,
   removing the redundant anchor elements.
index 78fd7a0..8f66da8 100644 (file)
@@ -1882,7 +1882,7 @@ class Parser
                elseif ( ';' === $char ) {
                        $result .= '<dl><dt>';
                        $this->mDTopen = true;
-               } elseif ( '>' === $char ) { $result .= "<blockquote><p>"; }
+               }
                else { $result = '<!-- ERR 1 -->'; }
 
                return $result;
@@ -1890,7 +1890,6 @@ class Parser
 
        /* private */ function nextItem( $char ) {
                if ( '*' === $char || '#' === $char ) { return '</li><li>'; }
-               elseif ( '>' === $char ) { return "</p><p>"; }
                elseif ( ':' === $char || ';' === $char ) {
                        $close = '</dd>';
                        if ( $this->mDTopen ) { $close = '</dt>'; }
@@ -1908,7 +1907,6 @@ class Parser
        /* private */ function closeList( $char ) {
                if ( '*' === $char ) { $text = '</li></ul>'; }
                elseif ( '#' === $char ) { $text = '</li></ol>'; }
-               elseif ( '>' === $char ) { $text = "</p></blockquote>"; }
                elseif ( ':' === $char ) {
                        if ( $this->mDTopen ) {
                                $this->mDTopen = false;
@@ -1954,23 +1952,14 @@ class Parser
                        // # = ol
                        // ; = dt
                        // : = dd
-                       // > = blockquote
 
                        $lastPrefixLength = strlen( $lastPrefix );
                        $preCloseMatch = preg_match('/<\\/pre/i', $oLine );
                        $preOpenMatch = preg_match('/<pre/i', $oLine );
-                       
-                       // Need to decode &gt; --> > for blockquote syntax. Re-encode later.
-                       // To avoid collision with real >s, we temporarily convert them to &gt;
-                       // This is a weird choice of armouring, but it's totally resistant to any
-                       //  collision.
-                       $orig = $oLine;
-                       $oLine = strtr( $oLine, array( '&gt;' => '>', '>' => '&gt;' ) );
-                       
                        // If not in a <pre> element, scan for and figure out what prefixes are there.
                        if ( !$this->mInPre ) {
                                # Multiple prefixes may abut each other for nested lists.
-                               $prefixLength = strspn( $oLine, '*#:;>' );
+                               $prefixLength = strspn( $oLine, '*#:;' );
                                $prefix = substr( $oLine, 0, $prefixLength );
 
                                # eh?
@@ -1986,9 +1975,6 @@ class Parser
                                $prefix = $prefix2 = '';
                                $t = $oLine;
                        }
-                       
-                       // Re-encode >s now
-                       $t = strtr( $t, array( '&gt;' => '>', '>' => '&gt;' ) );
 
                        # List generation
                        if( $prefixLength && $lastPrefix === $prefix2 ) {
index 9faf4e5..f020094 100644 (file)
@@ -6577,9 +6577,9 @@ RAW magic word
 !! test
 Always escape literal '>' in output, not just after '<'
 !! input
-test ><>
+><>
 !! result
-<p>test &gt;&lt;&gt;
+<p>&gt;&lt;&gt;
 </p>
 !! end
 
@@ -7399,24 +7399,6 @@ wgUseDynamicDates=true
 </p>
 !! end
 
-!! test
-Leading > blockquote syntax
-!! input
-> Hi
-> This
-> Is
-> A
-> Quote
-!! result
-<blockquote><p> Hi
-</p><p> This
-</p><p> Is
-</p><p> A
-</p><p> Quote
-</p></blockquote>
-
-!! end
-
 #
 #
 #