Polybuildr has uploaded a new change for review.
https://gerrit.wikimedia.org/r/191880
Change subject: Update parser tests to account for section anchors
......................................................................
Update parser tests to account for section anchors
I562e437e in core updated the parser's output and added clickable
anchors for section headers. This commit attempts to update the
parser tests to match core's output.
Bug: T90018
Change-Id: I4ebfc846cee22b13d0aa32f5e6830d1b2034761b
---
M lstParserTests.txt
M lsthParserTests.txt
2 files changed, 5 insertions(+), 5 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LabeledSectionTransclusion
refs/changes/80/191880/1
diff --git a/lstParserTests.txt b/lstParserTests.txt
index cdb55e4..738ccfe 100644
--- a/lstParserTests.txt
+++ b/lstParserTests.txt
@@ -253,7 +253,7 @@
!!input
{{#lst:headings|head}}
!!result
-<h2><span class="mw-headline" id="section">section</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Headings&action=edit&section=T-1"
title="Headings">edit</a><span
class="mw-editsection-bracket">]</span></span></h2>
+<h2><a href="#section" class="mw-headline-anchor" title="Link to this
section">§</a><span class="mw-headline" id="section">section</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Headings&action=edit&section=T-1"
title="Headings">edit</a><span
class="mw-editsection-bracket">]</span></span></h2>
<p>blah
</p>
!!end
@@ -263,7 +263,7 @@
!!input
{{#lst:headings|head2}}
!!result
-<h2><span class="mw-headline" id="section2">section2</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Headings&action=edit&section=T-2"
title="Headings">edit</a><span
class="mw-editsection-bracket">]</span></span></h2>
+<h2><a href="#section2" class="mw-headline-anchor" title="Link to this
section">§</a><span class="mw-headline" id="section2">section2</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Headings&action=edit&section=T-2"
title="Headings">edit</a><span
class="mw-editsection-bracket">]</span></span></h2>
<p>blah
</p>
!!end
@@ -286,10 +286,10 @@
!!input
{{#lst:lst_head_bounds|s}}
!!result
-<h1><span class="mw-headline" id="3">3</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Lst_head_bounds&action=edit&section=T-3"
title="Lst head bounds">edit</a><span
class="mw-editsection-bracket">]</span></span></h1>
+<h1><a href="#3" class="mw-headline-anchor" title="Link to this
section">§</a><span class="mw-headline" id="3">3</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Lst_head_bounds&action=edit&section=T-3"
title="Lst head bounds">edit</a><span
class="mw-editsection-bracket">]</span></span></h1>
<p>hi
</p>
-<h1><span class="mw-headline" id="4">4</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Lst_head_bounds&action=edit&section=T-4"
title="Lst head bounds">edit</a><span
class="mw-editsection-bracket">]</span></span></h1>
+<h1><a href="#4" class="mw-headline-anchor" title="Link to this
section">§</a><span class="mw-headline" id="4">4</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=Lst_head_bounds&action=edit&section=T-4"
title="Lst head bounds">edit</a><span
class="mw-editsection-bracket">]</span></span></h1>
!!end
diff --git a/lsthParserTests.txt b/lsthParserTests.txt
index beff69f..69aa49f 100644
--- a/lsthParserTests.txt
+++ b/lsthParserTests.txt
@@ -80,7 +80,7 @@
!!result
<p>sec 2
</p>
-<h3><span class="mw-headline" id="3">3</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=LsthSections&action=edit&section=T-1"
title="LsthSections">edit</a><span
class="mw-editsection-bracket">]</span></span></h3>
+<h3><a href="#3" class="mw-headline-anchor" title="Link to this
section">§</a><span class="mw-headline" id="3">3</span><span
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a
href="/index.php?title=LsthSections&action=edit&section=T-1"
title="LsthSections">edit</a><span
class="mw-editsection-bracket">]</span></span></h3>
<p>sec 3
</p>
!!end
--
To view, visit https://gerrit.wikimedia.org/r/191880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ebfc846cee22b13d0aa32f5e6830d1b2034761b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LabeledSectionTransclusion
Gerrit-Branch: master
Gerrit-Owner: Polybuildr <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits