From 33f5a8983beac7149a167edd26040004b602ab8c Mon Sep 17 00:00:00 2001
From: Andrew Garrett "; }
+ }
else { $result = ''; }
return $result;
@@ -1890,7 +1890,6 @@ class Parser
/* private */ function nextItem( $char ) {
if ( '*' === $char || '#' === $char ) { return '.
* (bug 19576) Moved the id attribues from the anchors accompanying section
headers to the elements within the section headers,
removing the redundant anchor elements.
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 78fd7a0b07..8f66da8285 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1882,7 +1882,7 @@ class Parser
elseif ( ';' === $char ) {
$result .= '
"; } elseif ( ':' === $char || ';' === $char ) { $close = ''; if ( $this->mDTopen ) { $close = ''; } @@ -1908,7 +1907,6 @@ class Parser /* private */ function closeList( $char ) { if ( '*' === $char ) { $text = ''; } elseif ( '#' === $char ) { $text = ''; } - elseif ( '>' === $char ) { $text = "
"; } 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('/> for blockquote syntax. Re-encode later. - // To avoid collision with real >s, we temporarily convert them to > - // This is a weird choice of armouring, but it's totally resistant to any - // collision. - $orig = $oLine; - $oLine = strtr( $oLine, array( '>' => '>', '>' => '>' ) ); - // If not in aelement, 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( '>' => '>', '>' => '>' ) ); # List generation if( $prefixLength && $lastPrefix === $prefix2 ) { diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 9faf4e5976..f020094141 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -6577,9 +6577,9 @@ RAW magic word !! test Always escape literal '>' in output, not just after '<' !! input -test ><> +><> !! result -test ><> +
><>
!! end @@ -7399,24 +7399,6 @@ wgUseDynamicDates=true !! end -!! test -Leading > blockquote syntax -!! input -> Hi -> This -> Is -> A -> Quote -!! result -- -!! end - # # # -- 2.20.1Hi -
This -
Is -
A -
Quote -