mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Poem
synced 2024-11-15 02:54:06 +00:00
Add extension registration mechanism to SiteConfig
This will be called by the ExtensionRegistry in core for extensions that are Parsoid-compatible. The set of registered extensions is part of the SiteConfig, which bundles all the configuration for a particular Parsoid instance. In addition, renamed some classes to make things clearer: `ExtensionModule` is the thing which is registered; it bundles a number of `ExtensionTagHandler`s, `ContentModelHandler`s, and DOM processors (which don't have a proper interface yet). There are a set of core handlers, which include wikitext, JSON, and a few extension tags (<pre>, <nowiki>, <gallery>). Change-Id: Iadbeb378bacb09264a4b1d3ee430a914eec23e48
This commit is contained in:
parent
4a46ba9496
commit
ded8bd5d74
|
@ -5,18 +5,18 @@ namespace Wikimedia\Parsoid\Ext\Poem;
|
|||
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
use Wikimedia\Parsoid\Ext\Extension;
|
||||
use Wikimedia\Parsoid\Ext\ExtensionTag;
|
||||
use Wikimedia\Parsoid\Ext\ExtensionModule;
|
||||
use Wikimedia\Parsoid\Ext\ExtensionTagHandler;
|
||||
use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI;
|
||||
use Wikimedia\Parsoid\Utils\DOMCompat;
|
||||
use Wikimedia\Parsoid\Utils\DOMUtils;
|
||||
|
||||
class Poem extends ExtensionTag implements Extension {
|
||||
class Poem extends ExtensionTagHandler implements ExtensionModule {
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getConfig(): array {
|
||||
return [
|
||||
'name' => 'poem',
|
||||
'name' => 'Poem',
|
||||
'domProcessors' => [
|
||||
'wt2htmlPostProcessor' => self::class
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue