X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fparser%2FBlockLevelPass.php;h=fab9ab7fb1828afb8e1cdfc746115bc7898d70bf;hb=3df3b575c6617df64ec98533cc7141bd2314e274;hp=599fbf61de1617c0d1a29a7c6711bd89fb478016;hpb=2d250f636ae3bd88f9f221fea4a95f41cdfa60da;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/BlockLevelPass.php b/includes/parser/BlockLevelPass.php index 599fbf61de..fab9ab7fb1 100644 --- a/includes/parser/BlockLevelPass.php +++ b/includes/parser/BlockLevelPass.php @@ -257,12 +257,17 @@ class BlockLevelPass { $output .= $this->nextItem( $prefix[$commonPrefixLength - 1] ); } + # Close an open
if we have a
(":") starting on this line + if ( $this->DTopen && $commonPrefixLength > 0 && $prefix[$commonPrefixLength - 1] === ':' ) { + $output .= $this->nextItem( ':' ); + } + # Open prefixes where appropriate. if ( $lastPrefix && $prefixLength > $commonPrefixLength ) { $output .= "\n"; } while ( $prefixLength > $commonPrefixLength ) { - $char = substr( $prefix, $commonPrefixLength, 1 ); + $char = $prefix[$commonPrefixLength]; $output .= $this->openList( $char ); if ( ';' === $char ) {