From 87b06ee148832ddddd96506733b7d96de643f217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 15 Feb 2024 13:40:09 +0100 Subject: HandleSectionLinks: Remove warning when we don't find attributes I realized that this code path is also triggered by a special page transclusion that outputs headings, e.g. `{{Special:RecentChanges}}`. It doesn't seem worth it to try to handle all these cases distinctly. Follow-up to b26db1f866c1f18d4e12466ccf191e7c65aa870d. Change-Id: I389ea9210fcc184f41b6731409331dbd3d34d2ca --- includes/OutputTransform/Stages/HandleSectionLinks.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'includes/OutputTransform') diff --git a/includes/OutputTransform/Stages/HandleSectionLinks.php b/includes/OutputTransform/Stages/HandleSectionLinks.php index de92e3517008..ca683120d42c 100644 --- a/includes/OutputTransform/Stages/HandleSectionLinks.php +++ b/includes/OutputTransform/Stages/HandleSectionLinks.php @@ -65,12 +65,7 @@ class HandleSectionLinks extends ContentTextTransformStage { ); if ( !isset( $attrs['data-mw-anchor'] ) ) { - if ( str_contains( $m[0], ''; + return $m[0]; } $anchor = $attrs['data-mw-anchor']; -- cgit v1.2.3