wiki.techinc.nl/includes/parser
C. Scott Ananian 6d5c62f5cf ParserOutputFlags: change HIDE_TOC to SHOW_TOC
When I implemented the ParserOutput merge logic in OutputPage
(I0909ac85c6c785d9089b077a16923c61d6a09996) I realized that
consistent "combine with OR" merge logic for the TOC flag
is obtained only if we invert the flag; that is, the existing
code showed a TOC *if any ParserOutput contained a shown TOC*
otherwise the TOC was hidden.

I'd originally implemented this in
I35e199cca40c0e4359ac493e5806dcf4ae49321c with the opposite sense in
order to avoid having to wait for ParserCache contents to expire:
since the default on most pages was to have the TOC shown anyway, if
"out of date" parser cache entries were missing a HIDE_TOC flag, it
wouldn't be a big deal, whereas if a SHOW_TOC flag were required then
upon deploy all cached pages would lose their TOC rendering.

BUT a better solution is just to let a "parser cache expiration time"
elapse between the time we start generating this flag and the time we
start using it.  The existing patch to export this
(I6cf76c870124c162dc1bcbc2f7e9ca0c5fdcd10e) uses
ParserOutput::getTOCHTML() anyway, so we can just wait to switch this
over to use the SHOW_TOC flag
(I10c3d06fb162103c06395bf9d1d27ac3c199d7b6) until the parser cache has
expired.

Anyway, this is a bit of a hassle to switch now, but I think having
consistent merge semantics for ParserOutput flags is worth the
short-term pain.

Bug: T310083
Change-Id: I3b76010f1e2283add629b84bf3824f215f932903
2022-07-27 18:45:59 -04:00
..
Hook Create ParserFetchTemplateData hook 2022-03-28 17:25:34 -04:00
Parsoid Remove $wikitextOverride argument to PageConfigFactory::create() 2022-07-26 17:31:25 -04:00
BlockLevelPass.php phan: Disable null_casts_as_any_type setting 2022-03-21 18:25:07 +00:00
CacheTime.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
CoreMagicVariables.php Add {{=}} as a built-in magic word 2022-05-20 13:08:20 -04:00
CoreParserFunctions.php parser: Fix CoreParserFunctions::urlencode() null coalescence $arg 2022-07-10 01:08:07 +00:00
CoreTagHooks.php Deprecate Parser::getFreshParser() 2022-07-05 14:09:36 +10:00
DateFormatter.php phan: Remove PhanTypePossiblyInvalidDimOffset suppression 2022-03-28 23:26:49 +02:00
DateFormatterFactory.php
LinkHolderArray.php Stop merging LinkCache select fields with page_title and page_namespace 2022-07-05 22:28:53 +00:00
MWTidy.php
Parser.php ParserOutputFlags: change HIDE_TOC to SHOW_TOC 2022-07-27 18:45:59 -04:00
ParserCache.php ParserCache: ensure we know a revision ID 2022-06-27 13:29:25 +00:00
ParserCacheFactory.php ParserCache: always use JSON 2022-06-07 15:19:45 +02:00
ParserCacheMetadata.php
ParserFactory.php Deprecate Parser::getFreshParser() 2022-07-05 14:09:36 +10:00
ParserObserver.php parser: Avoid pushing the whole content to ParserObserver debug log 2022-05-18 22:07:57 +00:00
ParserOptions.php ParserOption/ParserOutput flag to suppress or hide the table of contents 2022-07-21 15:29:11 -04:00
ParserOutput.php Merge "ParserOutput::mergeMapStrategy - use a more robust comparison for objects" 2022-07-21 02:51:31 +00:00
ParserOutputFlags.php ParserOutputFlags: change HIDE_TOC to SHOW_TOC 2022-07-27 18:45:59 -04:00
PPCustomFrame_Hash.php
PPDPart_Hash.php
PPDStack_Hash.php
PPDStackElement_Hash.php
PPFrame.php
PPFrame_Hash.php parser: Fix various scalar types to match documentation 2022-03-14 20:20:06 +00:00
PPNode.php
PPNode_Hash_Array.php
PPNode_Hash_Attr.php PHP 8.1: add ENT_COMPAT to some htmlspecialchars() calls 2022-01-25 16:30:44 +11:00
PPNode_Hash_Text.php PHP 8.1: add ENT_COMPAT to some htmlspecialchars() calls 2022-01-25 16:30:44 +11:00
PPNode_Hash_Tree.php PHP 8.1: add ENT_COMPAT to some htmlspecialchars() calls 2022-01-25 16:30:44 +11:00
PPTemplateFrame_Hash.php
Preprocessor.php phan: Disable null_casts_as_any_type setting 2022-03-21 18:25:07 +00:00
Preprocessor_Hash.php Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
RemexRemoveTagHandler.php Add Sanitizer::removeSomeTags() which uses Remex to tokenize 2022-03-04 14:06:02 -05:00
RemexStripTagHandler.php Add Sanitizer::removeSomeTags() which uses Remex to tokenize 2022-03-04 14:06:02 -05:00
RevisionOutputCache.php Clarify debug message 2022-03-25 23:23:51 +01:00
Sanitizer.php Various whitespace changes 2022-07-12 20:07:23 +02:00
StripState.php parser: Fix various scalar types to match documentation 2022-03-14 20:20:06 +00:00