X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2Fparser%2FBlockLevelPass.php;h=50c7e2376ec00a8996b4022aaaddadda57c3fb2c;hb=31a987345d47ab516d69914af95da2278121b25c;hp=f925038302ee36bdd797560513f907a991b70004;hpb=135718b90478b94052a2575e60f38406366055e7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/BlockLevelPass.php b/includes/parser/BlockLevelPass.php index f925038302..50c7e2376e 100644 --- a/includes/parser/BlockLevelPass.php +++ b/includes/parser/BlockLevelPass.php @@ -380,23 +380,19 @@ class BlockLevelPass { $output .= $pendingPTag . '
'; $pendingPTag = false; $this->lastParagraph = 'p'; - } else { - if ( $this->lastParagraph !== 'p' ) { - $output .= $this->closeParagraph(); - $pendingPTag = '

'; - } else { - $pendingPTag = '

'; - } - } - } else { - if ( $pendingPTag ) { - $output .= $pendingPTag; - $pendingPTag = false; - $this->lastParagraph = 'p'; } elseif ( $this->lastParagraph !== 'p' ) { - $output .= $this->closeParagraph() . '

'; - $this->lastParagraph = 'p'; + $output .= $this->closeParagraph(); + $pendingPTag = '

'; + } else { + $pendingPTag = '

'; } + } elseif ( $pendingPTag ) { + $output .= $pendingPTag; + $pendingPTag = false; + $this->lastParagraph = 'p'; + } elseif ( $this->lastParagraph !== 'p' ) { + $output .= $this->closeParagraph() . '

'; + $this->lastParagraph = 'p'; } } }