X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FBlockLevelPass.php;h=1173dd208660a35f2b3a3d408adae82dd68446bc;hb=52b74d44d522c2a1b67f9ccc2b8f7e44b6b52d7c;hp=7c92d76a20821248094aac4673affc4715bf2251;hpb=5ff5dbc7dc7a7439268631ccccd4f44fd18e50dd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/BlockLevelPass.php b/includes/parser/BlockLevelPass.php index 7c92d76a20..1173dd2086 100644 --- a/includes/parser/BlockLevelPass.php +++ b/includes/parser/BlockLevelPass.php @@ -236,7 +236,8 @@ class BlockLevelPass { $term = $t2 = ''; if ( $this->findColonNoLinks( $t, $term, $t2 ) !== false ) { $t = $t2; - $output .= $term . $this->nextItem( ':' ); + // Trim whitespace in list items + $output .= trim( $term ) . $this->nextItem( ':' ); } } } elseif ( $prefixLength || $lastPrefixLength ) { @@ -274,7 +275,8 @@ class BlockLevelPass { # @todo FIXME: This is dupe of code above if ( $this->findColonNoLinks( $t, $term, $t2 ) !== false ) { $t = $t2; - $output .= $term . $this->nextItem( ':' ); + // Trim whitespace in list items + $output .= trim( $term ) . $this->nextItem( ':' ); } } ++$commonPrefixLength; @@ -375,9 +377,12 @@ class BlockLevelPass { $this->inPre = false; } if ( $pendingPTag === false ) { - $output .= $t; if ( $prefixLength === 0 ) { + $output .= $t; $output .= "\n"; + } else { + // Trim whitespace in list items + $output .= trim( $t ); } } }