mediawiki-skins-Vector/includes/templates/TableOfContents__line.mustache
Func c6bf88520e ToC: Handle anchors with % in plaintext
TODO: Remove the fallback to {{anchor}} when all old parser cache expired.

Bug: T315222
Change-Id: I1da089cfef83131cda26859e3346cd2d840b3839
2022-09-16 11:24:27 +08:00

21 lines
911 B
Plaintext

<li id="toc-{{anchor}}"
class="sidebar-toc-list-item sidebar-toc-level-{{toclevel}}{{#is-top-level-section}}{{^vector-is-collapse-sections-enabled}} sidebar-toc-list-item-expanded{{/vector-is-collapse-sections-enabled}}{{/is-top-level-section}}">
<a class="sidebar-toc-link" href="#{{linkAnchor}}{{^linkAnchor}}{{anchor}}{{/linkAnchor}}">
<div class="sidebar-toc-text">
<span class="sidebar-toc-numb">{{number}}</span>{{{line}}}</div>
</a>
{{#html-summary}}
{{{.}}}
{{/html-summary}}
{{#is-top-level-section}}{{#is-parent-section}}
<button aria-controls="toc-{{anchor}}-sublist" class="mw-ui-icon mw-ui-icon-wikimedia-expand mw-ui-icon-small sidebar-toc-toggle">
{{{vector-button-label}}}
</button>
{{/is-parent-section}}{{/is-top-level-section}}
<ul id="toc-{{anchor}}-sublist" class="sidebar-toc-list">
{{#array-sections}}
{{>TableOfContents__line}}
{{/array-sections}}
</ul>
</li>