aboutsummaryrefslogtreecommitdiffstats
path: root/includes/content
diff options
context:
space:
mode:
authorBartosz Dziewoński <dziewonski@fastmail.fm>2024-02-08 23:57:42 +0100
committerBartosz Dziewoński <dziewonski@fastmail.fm>2024-02-08 23:57:42 +0100
commit9fe361091b73b5a0c3066017047b7bb3e6bb9822 (patch)
treeddae53cccdc6a5160113f9fef76c658a1dcdc9b2 /includes/content
parent9e27d4ebb4a742dd2c9742d7eb93c3065853fcd2 (diff)
downloadmediawikicore-9fe361091b73b5a0c3066017047b7bb3e6bb9822.tar.gz
mediawikicore-9fe361091b73b5a0c3066017047b7bb3e6bb9822.zip
WikiTextStructure: Support heading tags with attributes
Change-Id: Ie68c7c695cb84ed6844d6d422284dca8c0c13072
Diffstat (limited to 'includes/content')
-rw-r--r--includes/content/WikiTextStructure.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/content/WikiTextStructure.php b/includes/content/WikiTextStructure.php
index 1046a4329b89..26c6f07d6b4b 100644
--- a/includes/content/WikiTextStructure.php
+++ b/includes/content/WikiTextStructure.php
@@ -190,7 +190,7 @@ class WikiTextStructure {
*/
private function extractTextBeforeFirstHeading( $text ) {
$matches = [];
- if ( !preg_match( '/<h[123456]>/', $text, $matches, PREG_OFFSET_CAPTURE ) ) {
+ if ( !preg_match( '/<h[123456]\b/', $text, $matches, PREG_OFFSET_CAPTURE ) ) {
// There isn't a first heading, so we interpret this as the article
// being entirely without heading.
return null;