From ac3bb6d89fff497399d65fe93dd71300d1edd7c2 Mon Sep 17 00:00:00 2001 From: Reception123 Date: Wed, 22 Jan 2025 19:37:59 +0100 Subject: [PATCH] add NumberHeadings per T12989 (#5787) Co-authored-by: github-actions --- LocalSettings.php | 2 +- LocalWiki.php | 2 +- ManageWikiExtensions.php | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/LocalSettings.php b/LocalSettings.php index 6504e97e50..ba9086d159 100644 --- a/LocalSettings.php +++ b/LocalSettings.php @@ -1750,7 +1750,7 @@ ], ], ], - 'jbcstudioswiki' => [ + 'jbcstudioswiki' => [ 'poweredby' => [ 'mediawiki' => [ 'src' => 'https://static.wikitide.net/jbcstudioswiki/f/f7/Poweredbymediawiki_badge.svg', diff --git a/LocalWiki.php b/LocalWiki.php index 46718fcea4..f2bcb3b2ae 100644 --- a/LocalWiki.php +++ b/LocalWiki.php @@ -25,7 +25,7 @@ function fnIndentSectionsBeforePageDisplay( $out, $skin ) { for ( $i = 6; $i >= 1; $i -= 1 ) { $pattern = sprintf( '/(\s*?)(.*?)(?=(|\Z))/ms', $i, $i, $i ); - //$pattern = sprintf( '/(]+><\/a>\s*?.*?<\/h%d>)(.*?)(?=(]+><\/a>|\Z))/ms', $i, $i, $i ); + // $pattern = sprintf( '/(]+><\/a>\s*?.*?<\/h%d>)(.*?)(?=(]+><\/a>|\Z))/ms', $i, $i, $i ); $text2 = preg_replace( $pattern, '$1
$2
', $text ); if ( $text2 !== null ) { $text = $text2; diff --git a/ManageWikiExtensions.php b/ManageWikiExtensions.php index 9b1e3fb71e..3a280f7bd2 100644 --- a/ManageWikiExtensions.php +++ b/ManageWikiExtensions.php @@ -762,6 +762,13 @@ 'requires' => [], 'section' => 'parserhooks', ], + 'numberheadings' => [ + 'name' => 'NumberHeadings', + 'linkPage' => 'https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:NumberHeadings', + 'conflicts' => false, + 'requires' => [], + 'section' => 'parserhooks', + ], 'opengraphmeta' => [ 'name' => 'OpenGraphMeta', 'linkPage' => 'https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:OpenGraphMeta',