Skip to content

Commit

Permalink
add NumberHeadings per T12989 (#5787)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
Reception123 and github-actions authored Jan 22, 2025
1 parent b9def6d commit ac3bb6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@
],
],
],
'jbcstudioswiki' => [
'jbcstudioswiki' => [
'poweredby' => [
'mediawiki' => [
'src' => 'https://static.wikitide.net/jbcstudioswiki/f/f7/Poweredbymediawiki_badge.svg',
Expand Down
2 changes: 1 addition & 1 deletion LocalWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function fnIndentSectionsBeforePageDisplay( $out, $skin ) {

for ( $i = 6; $i >= 1; $i -= 1 ) {
$pattern = sprintf( '/(<h%d>\s*?<span class="(?:editsection|mw-headline)".+?<\/h%d>)(.*?)(?=(<h[1-%d]>|\Z))/ms', $i, $i, $i );
//$pattern = sprintf( '/(<a[^>]+><\/a><h%d>\s*?<span class="(?:editsection|mw-headline)">.*?<\/h%d>)(.*?)(?=(<a[^>]+><\/a><h[1-%d]>|\Z))/ms', $i, $i, $i );
// $pattern = sprintf( '/(<a[^>]+><\/a><h%d>\s*?<span class="(?:editsection|mw-headline)">.*?<\/h%d>)(.*?)(?=(<a[^>]+><\/a><h[1-%d]>|\Z))/ms', $i, $i, $i );
$text2 = preg_replace( $pattern, '$1<blockquote style="margin:0px 0px 0px 1.5em">$2</blockquote>', $text );
if ( $text2 !== null ) {
$text = $text2;
Expand Down
7 changes: 7 additions & 0 deletions ManageWikiExtensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ac3bb6d

Please sign in to comment.