mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-23 23:43:54 +00:00
Prefer Html::rawElement instead of open/closeElement
Html::open/closeElement are hard to read and possibly error prone. We can easily avoid it in this case here. Change-Id: I2251cb63e58bc132ced0bb684e3f0e3be35ab1aa
This commit is contained in:
parent
6dd0b66fea
commit
eeffc4bf38
|
@ -710,9 +710,7 @@ class TemplateDataBlob {
|
|||
$formatMsg = 'custom';
|
||||
}
|
||||
$sorting = count( (array)$data->params ) > 1 ? " sortable" : "";
|
||||
$html =
|
||||
Html::openElement( 'div', [ 'class' => 'mw-templatedata-doc-wrap' ] )
|
||||
. Html::element(
|
||||
$html = Html::element(
|
||||
'p',
|
||||
[
|
||||
'class' => [
|
||||
|
@ -879,10 +877,9 @@ class TemplateDataBlob {
|
|||
)
|
||||
. '</tr>';
|
||||
}
|
||||
$html .= '</tbody></table>'
|
||||
. Html::closeElement( 'div' );
|
||||
$html .= '</tbody></table>';
|
||||
|
||||
return $html;
|
||||
return Html::rawElement( 'div', [ 'class' => 'mw-templatedata-doc-wrap' ], $html );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue