Remove back-compat for <editsection>

The tag has been <mw:editsection> since at least 2011
(f0fd318a4e), we no longer need to
include the ancient <editsection> variant in our regexp and
test cases.

Change-Id: I5fd783556810ea13b07a69066ea6762d1a1863e1
This commit is contained in:
C. Scott Ananian 2023-03-15 13:52:01 -04:00
parent cda1734b3b
commit 99e9d4927f
3 changed files with 1 additions and 11 deletions

View file

@ -312,7 +312,7 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
private $mMaxAdaptiveExpiry = INF;
private const EDITSECTION_REGEX =
'#<(?:mw:)?editsection page="(.*?)" section="(.*?)">(.*?)</(?:mw:)?editsection>#s';
'#<mw:editsection page="(.*?)" section="(.*?)">(.*?)</mw:editsection>#s';
// finalizeAdaptiveCacheExpiry() uses TTL = MAX( m * PARSE_TIME + b, MIN_AR_TTL)
// Current values imply that m=3933.333333 and b=-333.333333

View file

@ -44,11 +44,6 @@ MathML;
'<mw:editsection page="foo" section="bar">foo</mw:editsection>',
'<mw:editsection> should survive tidy'
],
[
'<editsection page="foo" section="bar">foo</editsection>',
'<editsection page="foo" section="bar">foo</editsection>',
'<editsection> should survive tidy'
],
[
'<meta property="mw:PageProp/toc" />',
'<meta property="mw:PageProp/toc" />',

View file

@ -292,11 +292,6 @@ class RemexDriverTest extends MediaWikiUnitTestCase {
'<mw:editsection page="foo" section="bar">foo</mw:editsection>',
'<mw:editsection page="foo" section="bar">foo</mw:editsection>',
],
[
'<editsection> should survive tidy',
'<editsection page="foo" section="bar">foo</editsection>',
'<editsection page="foo" section="bar">foo</editsection>',
],
[
'TOC_PLACEHOLDER should survive tidy',
'<meta property="mw:PageProp/toc" />',