diff --git a/src/modules/core.js b/src/modules/core.js index c00f0643..8a667e42 100644 --- a/src/modules/core.js +++ b/src/modules/core.js @@ -1669,7 +1669,7 @@ // Put at top for historical reasons. People are used to it being there. banners.unshift( '{{subst:WPAFC/article' + - ( revId ? '|oldid=' + revId : '' ) + + ( revId ? ' |oldid=' + revId : '' ) + '}}' ); @@ -1679,9 +1679,9 @@ // add biography banner to array if ( isBiography ) { banners.push( - '{{WikiProject Biography|living=' + + '{{WikiProject Biography |living=' + ( lifeStatus !== 'unknown' ? ( lifeStatus === 'living' ? 'yes' : 'no' ) : '' ) + - '|listas=' + subjectName + + ' |listas=' + subjectName + '}}' ); } @@ -1707,8 +1707,8 @@ // Add |class= to shell. // Add |1=. Improves readability when lots of other parameters present. wikicode = '{{WikiProject banner shell' + - ( newAssessment ? '|class=' + newAssessment : '' ) + - '|1=\n' + + ( newAssessment ? ' |class=' + newAssessment : '' ) + + ' |1=\n' + banners.join( '\n' ) + '\n}}\n' + wikicode; diff --git a/tests/test-core.js b/tests/test-core.js index 0d5f154e..14447323 100644 --- a/tests/test-core.js +++ b/tests/test-core.js @@ -132,8 +132,8 @@ describe( 'AFCH.addTalkPageBanners', () => { const subjectName = ''; const output = AFCH.addTalkPageBanners( wikicode, newAssessment, revId, isBiography, newWikiProjects, lifeStatus, subjectName ); expect( output ).toBe( -`{{WikiProject banner shell|1= -{{subst:WPAFC/article|oldid=592485}} +`{{WikiProject banner shell |1= +{{subst:WPAFC/article |oldid=592485}} }}` ); } ); @@ -150,8 +150,8 @@ I have a question. Can you help answer it? –[[User:Novem Linguae|