There are two related issues here: first, when parsing non-wikitext pages for side effects (categories, etc) we want to ensure that any spurious `===` or `<h2>` on the page don't create nonsense "sections". We introduce a ParserOption to suppress the ToC in this case; a follow-up patch will set this parser option from the correct path in CodeContentHandler and its subclasses. [T307691] Second, modern skins can generate the ToC on-the-fly outside the content area, and need to be able to regenerate the ToC from API output when the page is edited. A ParserOutput flag is added to mirror the $enoughToc variable from the parser to indicate whether or not the ToC should be generated and/or updated after edit. (See I6cf76c870124c162dc1bcbc2f7e9ca0c5fdcd10e for parallel code to echo this value in ApiParse.) Bug: T294950 Bug: T307691 Change-Id: I35e199cca40c0e4359ac493e5806dcf4ae49321c |
||
|---|---|---|
| .. | ||
| api-testing | ||
| common | ||
| parser | ||
| phpunit | ||
| qunit | ||
| selenium | ||
| .htaccess | ||