Wrap auto-numbering for section heading in a classed span (bug 33450)
authorWaldir Pimenta <waldir@email.com>
Sun, 3 Jun 2012 14:15:28 +0000 (15:15 +0100)
committerWaldir Pimenta <waldir@email.com>
Sun, 3 Jun 2012 14:44:46 +0000 (15:44 +0100)
Change-Id: Ibea90c096b1b757c277819fc403eef45209fc94c

includes/parser/Parser.php

index 35f187f..fa734b4 100644 (file)
@@ -4170,7 +4170,7 @@ class Parser {
                        # Don't number the heading if it is the only one (looks silly)
                        if ( count( $matches[3] ) > 1 && $this->mOptions->getNumberHeadings() ) {
                                # the two are different if the line contains a link
-                               $headline = $numbering . ' ' . $headline;
+                               $headline = Html::element( 'span', array( 'class' => 'mw-headline-number' ), $numbering ) . ' ' . $headline;
                        }
 
                        # Create the anchor for linking from the TOC to the section