All,
I would like to draw your attention to ticket https://phabricator.wikimedia.org/T47317. This ticket highlights some issues with the way sections, headers and the TOC are handled in the parser in combination with tag extensions and parser functions.
Basically the problem is that the TOC is created before strip markers are substituted, which prevents some sections from showing up in the TOC.
This issue is limiting the usefulness of such constructs, so I am very interested to spend some time on it with people well-versed in the parser code and in particular the formatHeadings function.
Of course, there are plenty more details I could give but before flooding wikitech-l with those I thought I'd poll for the interest in addressing this. Maybe the next step could be some chat over IRC or another medium?
Thanks in advance, Lord_Farin
On Thu, Jul 28, 2016 at 5:46 AM, Lord_Farin lord_farin@proofwiki.org wrote:
I would like to draw your attention to ticket https://phabricator.wikimedia.org/T47317. This ticket highlights some issues with the way sections, headers and the TOC are handled in the parser in combination with tag extensions and parser functions.
Basically the problem is that the TOC is created before strip markers are substituted, which prevents some sections from showing up in the TOC.
Thanks for the ping on T47317. For those that haven't been following it: Lord Farin has done some exploration of formatHeadings in the parser, and made the following observation:
[The call to preprocessToDom] indicates to me that something is wrong here. Reprocessing the entire DOM tree of the raw wikitext indicates that things are happening at the wrong level or wrong place in the sequence altogether.
I'd love for someone who is more familiar with the differences between Parsoid's DOM model and MediaWiki's PHP-based processing model to reply to this (preferably on the ticket[1])
wikitech-l@lists.wikimedia.org