X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FBlockLevelPass.php;h=fab9ab7fb1828afb8e1cdfc746115bc7898d70bf;hb=4f8abeabf170f9edf3a84a48853bc23470926a0d;hp=599fbf61de1617c0d1a29a7c6711bd89fb478016;hpb=77e2873f2eef2c3a1a5f879e812ecc8c4ec7ea42;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 ) {