https://bugzilla.wikimedia.org/show_bug.cgi?id=45317

--- Comment #10 from Lord_Farin <[email protected]> ---
Having a need for nested tag use, I've already implemented an according patch
in the DOM preprocessor. Accordingly, I've decided to try and follow up on your
suggestion:

> I wonder if it would just make sense to call formatHeadings some point after
> unstripGeneral. I don't think anyone is really using general strip markers to
> hide headings from the TOC. (This thought is just an initial reaction. Would
> need to do more research to see if that's remotely sane).

I've just tried it, and it works -- the sections now appear in the ToC. This
ties in with my observation that there is no actual use for the $isMain
parameter to formatHeadings (the function just shouldn't be called if this
parameter is false). 

It also makes sense conceptually to create a ToC only after the content (or at
least, the structure) of the entire page has been determined (but of course,
before nowiki strip markers are replaced), and as such, it needn't be processed
by recursiveTagParse/internalParse; a call in the main parse routine suffices.
My attempt added the formatHeadings call directly after unstripGeneral.

Some testing does reveal, however, that moving the formatHeadings call spoils
the edit section links (PHPUnit tests show that they do not get rendered any
more).

This needs to be dealt with, but for our wiki it is not a problem since
section-wise editing is discouraged anyway.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to