wiki.techinc.nl/includes/OutputTransform
C. Scott Ananian 7738554eee [OutputTransform] Add data-mw-parsoid-version to wrapper div
Adding a data-mw-parsoid-version attribute to the wrapper div helps to
unambiguously mark parsoid-generated output in a way which is compatible
with CSS rules and client-side JavaScript.

By embedding the current version of parsoid in the data attribute,
sophisticated CSS rules can match against a specific version of
Parsoid in order to facilitate proper behavior; for example:

    div[data-mw-parsoid-version^="0.20.0"]

This could be useful in deployment scenarios where the parser cache
might contain content generated by older or newer versions of Parsoid,
for roll-forward or roll-back deployment scenarios, respectively.

Bug: T363378
Change-Id: I941d31479eebb12ea1f4dcdb0a1737033ddc8ac1
2024-04-29 12:36:50 -04:00
..
Stages [OutputTransform] Add data-mw-parsoid-version to wrapper div 2024-04-29 12:36:50 -04:00
ContentDOMTransformStage.php [OutputTransform] Remove broken and unused 'bodyContentOnly' option 2024-02-15 13:05:53 -05:00
ContentTextTransformStage.php Fix capitalisation of MediaWiki\OutputTransform namespace 2024-01-02 03:03:14 +00:00
DefaultOutputPipelineFactory.php ExtractBody: Use page title recorded in ParserOutput 2024-04-19 18:31:08 +05:30
OutputTransformPipeline.php [OutputTransform] Remove broken and unused 'bodyContentOnly' option 2024-02-15 13:05:53 -05:00
OutputTransformStage.php Rename PostCacheTransformHookRunner 2024-02-07 13:01:20 -05:00
README.md

Output transformations pipelines for wikitext

The classes in the Stages/ subdirectory contains HTML and DOM transforms for use in output processing pipelines, i.e. postprocessors for ParserOutput objects that either directly result from a parse or are fetched from ParserCache.

The default pipeline is created by DefaultOutputTransformFactory; it corresponds to what was previously contained in ParserOutput::getText. The shouldRun method in these stages uses defaults that indicates if the stage runs or not in the default OutputTransformPipeline.