Page MenuHomePhabricator

Conditional use of plain heading element tags use should cause the built in ToC generation to ignore detection and listing of such headings
Closed, DuplicatePublic

Description

Currently, the use of "straight" html heading tags...

<h2>Chapter Heading 4</h2>

... already differs from the typical wiki mark-up's usage...

== Chapter Heading 4 ==

... in that the [edit] link is not generated to the right of the headline text.

Unfortunately, the straight html element tag approach still causes each heading to become part of the built-in Table of Contents listing whether applicable or not.

:(

Hoping there is a way to have the parser skip the creation of the span element involved with subsequent ToC listing if some condition was met beforehand (such as the presence of a class name under the heading tag for example)

<h2 class="mw-legacy">Chapter Heading 4</h2>

Doesn't matter if the class is added by Linker.php(?) or if user's must add it themselves; whatever is easier.


See more details at: https://test2.wikipedia.org/wiki/Headings