diff --git a/extensions/markdown/bootstrap.php b/extensions/markdown/bootstrap.php index 0d9c32279..f6b585c5c 100644 --- a/extensions/markdown/bootstrap.php +++ b/extensions/markdown/bootstrap.php @@ -9,9 +9,11 @@ * file that was distributed with this source code. */ -use Flarum\Markdown\Listener; -use Illuminate\Contracts\Events\Dispatcher; +use Flarum\Extend; +use s9e\TextFormatter\Configurator; -return function (Dispatcher $events) { - $events->subscribe(Listener\FormatMarkdown::class); -}; +return [ + new Extend\FormatterConfiguration(function (Configurator $config) { + $config->Litedown; + }), +]; diff --git a/extensions/markdown/composer.json b/extensions/markdown/composer.json index 9f14aa42d..24b4cafb8 100644 --- a/extensions/markdown/composer.json +++ b/extensions/markdown/composer.json @@ -17,11 +17,6 @@ "require": { "flarum/core": "^0.1.0-beta.6" }, - "autoload": { - "psr-4": { - "Flarum\\Markdown\\": "src/" - } - }, "extra": { "branch-alias": { "dev-master": "0.1.x-dev" diff --git a/extensions/markdown/src/Listener/FormatMarkdown.php b/extensions/markdown/src/Listener/FormatMarkdown.php deleted file mode 100644 index 4364e54ed..000000000 --- a/extensions/markdown/src/Listener/FormatMarkdown.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Flarum\Markdown\Listener; - -use Flarum\Formatter\Event\Configuring; -use Illuminate\Contracts\Events\Dispatcher; - -class FormatMarkdown -{ - /** - * @param Dispatcher $events - */ - public function subscribe(Dispatcher $events) - { - $events->listen(Configuring::class, [$this, 'addMarkdownFormatter']); - } - - /** - * @param Configuring $event - */ - public function addMarkdownFormatter(Configuring $event) - { - $event->configurator->Litedown; - } -}