Page MenuHomePhabricator
Authored By
Sbapple
Apr 19 2018, 4:48 AM
Size
731 B
Referenced Files
None
Subscribers
None

ParserDiff.txt

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index b66031cc88..e1213971f6 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -486,7 +486,13 @@ class Parser {
# with CSS (T37247)
$class = $this->mOptions->getWrapOutputClass();
if ( $class !== false && !$this->mOptions->getInterfaceMessage() ) {
- $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+ # Enclose main body content with a <main> instead of a <div>.
+ # (T178398)
+ if ($class == "mw-parser-output") {
+ $test = Html::rawElement( 'main', null, $text );
+ } else {
+ $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+ }
}
$this->mOutput->setText( $text );

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5750008
Default Alt Text
ParserDiff.txt (731 B)

Event Timeline