'LST',
'tags' => [
[
'name' => 'labeledsectiontransclusion',
'handler' => self::class,
],
[
'name' => 'labeledsectiontransclusion/begin',
'handler' => self::class,
],
[
'name' => 'labeledsectiontransclusion/end',
'handler' => self::class,
]
]
];
}
/** @inheritDoc */
public function domToWikitext(
ParsoidExtensionAPI $extApi, Element $node, bool $wrapperUnmodified
) {
// TODO: We're keeping this serial handler around to remain backwards
// compatible with stored content version 1.3.0 and below. Remove it
// when those versions are no longer supported.
$dp = DOMDataUtils::getDataParsoid( $node );
$src = null;
$content = DOMCompat::getAttribute( $node, 'content' ) ?? '';
if ( isset( $dp->src ) ) {
$src = $dp->src;
} elseif ( DOMUtils::matchTypeOf( $node, '/begin/' ) ) {
$src = '';
} elseif ( DOMUtils::matchTypeOf( $node, '/end/' ) ) {
$src = '';
} else {
$extApi->log( 'error', 'LST without content in: ' .
DOMCompat::getOuterHTML( $node ) );
$src = '';
}
return $src;
}
}