The regex failed to match for input text like
==<nowiki>
</nowiki>==
resulting in <mw:editsection> tags being leaked into the output.
Change-Id: I3daade920d2de8cd3fc31fcaabf46ffe14b047d5
private $mMaxAdaptiveExpiry = INF;
const EDITSECTION_REGEX =
- '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
+ '#<(?: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
</p>
!! end
+!! test
+Heading with line break in nowiki
+!! wikitext
+== A <nowiki>B
+C</nowiki> ==
+!! html
+<h2><span class="mw-headline" id="A_B.0AC">A B
+C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
!! test
Parsing an URL
!! wikitext