Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/175661
Change subject: Correct placement of <noinclude> tags ...................................................................... Correct placement of <noinclude> tags The noinclude tags should appear only if the page is not a subpage and only around the <tamplatedata> tags. Change-Id: I492bb35c8f2c70235f3ceefdddcc4df6548d7469 --- M modules/ext.templateDataGenerator.core.js 1 file changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/61/175661/1 diff --git a/modules/ext.templateDataGenerator.core.js b/modules/ext.templateDataGenerator.core.js index a3c120c..eabf99f 100644 --- a/modules/ext.templateDataGenerator.core.js +++ b/modules/ext.templateDataGenerator.core.js @@ -873,14 +873,16 @@ '<templatedata>\n' + tdOutput + '\n</templatedata>' ); } else { - // Add the <templatedata> - finalOutput = originalTemplateDataWikitext + '\n<templatedata>\n' + - tdOutput + - '\n</templatedata>\n'; - - // If we are not in a subpage, add <noinclude> tags - if ( !isPageSubLevel ) { - finalOutput = '\n<noinclude>' + finalOutput + '</noinclude>\n'; + if ( isPageSubLevel ) { + // Add the <templatedata> + finalOutput = originalTemplateDataWikitext + '\n<templatedata>\n' + + tdOutput + + '\n</templatedata>\n'; + } else { + // If we are not in a subpage, add <noinclude> tags + finalOutput = originalTemplateDataWikitext + '\n<noinclude>\n<templatedata>\n' + + tdOutput + + '\n</templatedata>\n</noinclude>\n'; } } -- To view, visit https://gerrit.wikimedia.org/r/175661 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I492bb35c8f2c70235f3ceefdddcc4df6548d7469 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits