Match section issues to section number

The section number relates to the position of the corresponding heading
not the corresponding top level section.

This only changes the URL, not the functionality. sub section issues
will continue to be grouped along with other section issues.

Bug: T197932
Change-Id: I325a3b477f89c9cc24f13ca017f478a6b7e7b68e
This commit is contained in:
jdlrobson 2018-07-13 13:23:55 -07:00 committed by Stephen Niedzielski
parent 7c4ef3b2db
commit 54af37c269
1 changed files with 6 additions and 2 deletions

View File

@ -217,8 +217,12 @@
createBanner( $lead, label, 0, inline );
if ( isInGroupB ) {
// parse other sections but only in group B. In treatment A no issues are shown for sections.
$lead.nextAll( '[class^="mf-section"]' ).each( function ( i, sectionEl ) {
createBanner( $( sectionEl ), label, i + 1, inline );
$lead.nextAll( 'h1,h2,h3,h4,h5,h6' ).each( function ( i, headingEl ) {
var $headingEl = $( headingEl ),
$section = $headingEl.next(),
sectionNum = $headingEl.find( '.edit-page' ).data( 'section' );
createBanner( $section, label, sectionNum, inline );
} );
}
}