Tpt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/361206 )
Change subject: Preprocesses Wikitext before looking for the Index table of content ...................................................................... Preprocesses Wikitext before looking for the Index table of content Bug: T168768 Change-Id: Ia8074832cc9cffd0f2158d53888230b0c7574fce --- M includes/index/ProofreadIndexPage.php M tests/parser/proofreadpage_pages_pagelist.txt 2 files changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/06/361206/1 diff --git a/includes/index/ProofreadIndexPage.php b/includes/index/ProofreadIndexPage.php index b82374e..a8c287e 100644 --- a/includes/index/ProofreadIndexPage.php +++ b/includes/index/ProofreadIndexPage.php @@ -285,7 +285,7 @@ * @return array of array( Title title of the pointed page, the label of the link ) */ public function getLinksToMainNamespace() { - return $this->getLinksToNamespaceFromContent( NS_MAIN ); + return $this->getLinksToNamespaceFromContent( NS_MAIN, true ); } /** diff --git a/tests/parser/proofreadpage_pages_pagelist.txt b/tests/parser/proofreadpage_pages_pagelist.txt index 6c2cbf3..98f7048 100644 --- a/tests/parser/proofreadpage_pages_pagelist.txt +++ b/tests/parser/proofreadpage_pages_pagelist.txt @@ -27,15 +27,22 @@ !!endarticle !!article +Index TOC +!!text +* [[Test/Chapter 2|Chapter 2]] +* [[Test/Chapter 3|Chapter 3]] +!!endarticle + +!!article Index:Test !!text {{:MediaWiki:Proofreadpage_index_template |Title=Title |Pages=[[Page:Test 1.jpg|TOC]] [[Page:Test 2.tiff|1]] [[Page:Test 3.png|2]] |Author=[[Author:Me]] -|TOC=* [[Test/Chapter 1]] -* [[Test/Chapter 2|Chapter 2]] -* [[Test/Chapter 3|Chapter 3]] +|TOC= +* [[Test/Chapter 1]] +{{:Index TOC}} }} !!endarticle -- To view, visit https://gerrit.wikimedia.org/r/361206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8074832cc9cffd0f2158d53888230b0c7574fce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt <thoma...@hotmail.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits