$parser = $this->getParser( $preprocessor );
$title = Title::newFromText( $titleText );
+ if ( isset( $opts['styletag'] ) ) {
+ // For testing the behavior of <style> (including those deduplicated
+ // into <link> tags), add tag hooks to allow them to be generated.
+ $parser->setHook( 'style', function ( $content, $attributes, $parser ) {
+ $marker = Parser::MARKER_PREFIX . '-style-' . md5( $content ) . Parser::MARKER_SUFFIX;
+ $parser->mStripState->addNoWiki( $marker, $content );
+ return Html::inlineStyle( $marker, 'all', $attributes );
+ } );
+ $parser->setHook( 'link', function ( $content, $attributes, $parser ) {
+ return Html::element( 'link', $attributes );
+ } );
+ }
+
if ( isset( $opts['pst'] ) ) {
$out = $parser->preSaveTransform( $test['input'], $title, $user, $options );
$output = $parser->getOutput();
* @return array
*/
private function listTables() {
- global $wgCommentTableSchemaMigrationStage;
+ global $wgCommentTableSchemaMigrationStage, $wgActorTableSchemaMigrationStage;
$tables = [ 'user', 'user_properties', 'user_former_groups', 'page', 'page_restrictions',
'protected_titles', 'revision', 'ip_changes', 'text', 'pagelinks', 'imagelinks',
$tables[] = 'image_comment_temp';
}
+ if ( $wgActorTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) {
+ // The new tables for actors are in use
+ $tables[] = 'actor';
+ $tables[] = 'revision_actor_temp';
+ }
+
if ( in_array( $this->db->getType(), [ 'mysql', 'sqlite', 'oracle' ] ) ) {
array_push( $tables, 'searchindex' );
}