Fix a regression of bug 4899 due to HHPv2: <h> tags now appear on tree depth levels...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 1 Feb 2008 01:35:55 +0000 (01:35 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 1 Feb 2008 01:35:55 +0000 (01:35 +0000)
commiteb76c1f16cb5e259e087d4045b80ce5528adef6f
tree8e9b02f76421e2964403e5c74415993bb54d33be
parentc9b721f2d91b698eced24b05c3bef74cf5a037de
Fix a regression of bug 4899 due to HHPv2: <h> tags now appear on tree depth levels other than the first. The 4899 aspect is easily fixed by having extractSections() look at the i attribute instead of just counting.

The implications in general are that headings inside properly-closed double braces will not have section edit links, even where the braces are broken by invalid title characters and expanded literally to recover the heading. Respecting such headings as section breaks would run into the same problems as those discussed w.r.t. LST on wikitech-l -- there's no way to recover the text for a section that starts on one tree level and finishes on a different one. The fact that higher level <h> nodes appear in the XML is just due to a shortcut in preprocessToObj(): headings are put into the stack in case the braces turn out to be unclosed, in which case the heading will be at level 1 of the tree.
includes/Parser.php
includes/Preprocessor_DOM.php