From T171797#3478411:
There are three cases with the wrapclass parser option:
- Wrapping with the default "mw-parser-output"
- No wrapping at all
- Wrapping with some non-default class
As far as actual parser output beyond the wrapper div itself, the only thing currently varying on this option is TemplateStyles. And TemplateStyles generates the same output for #1 and #2. So what we could probably do is:
- Deprecate #2 (the ability to set wrapclass to false for "no wrapping") in favor of an "unwrap" transformation that removes the default wrapper div.
- Change MessageCache/Message, TextExtracts, ParsoidBatchAPI, and MobileFrontend to use the "unwrap" transformation instead of setting false. Also update tests in TemplateStyles and Wikibase to do whatever is appropriate where they're currently setting false.
- Remove wrapclass from ParserOptions::$inCacheKey, causing ParserOptions with a non-default wrapclass to become non-cacheable.