ScribuntoContentHandler: Add lang="en" to fallback <pre>

It currently inherents from the mw-parser-output div, which sets
it based on the documentation page (content language).

Change-Id: I79847cd8cfe75598c843e96a09d9aa61b00304a9
This commit is contained in:
Timo Tijhof 2023-11-14 23:05:54 +00:00 committed by C. Scott Ananian
parent ae8c68b051
commit 8e0684da7a

View file

@ -227,8 +227,11 @@ class ScribuntoContentHandler extends CodeContentHandler {
} }
} }
return "<pre class='mw-code mw-script' dir='ltr'>\n" . return Html::element( 'pre', [
htmlspecialchars( $source ) . // Same as CodeContentHandler
"\n</pre>\n"; 'lang' => 'en',
'dir' => 'ltr',
'class' => 'mw-code mw-script'
], "\n$source\n" );
} }
} }