1<?php
2
3/*
4 * This file is part of the league/commonmark package.
5 *
6 * (c) Colin O'Dell <colinodell@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace League\CommonMark\Extension\DisallowedRawHtml;
13
14use League\CommonMark\Block\Element\HtmlBlock;
15use League\CommonMark\Block\Renderer\HtmlBlockRenderer;
16use League\CommonMark\ConfigurableEnvironmentInterface;
17use League\CommonMark\Extension\ExtensionInterface;
18use League\CommonMark\Inline\Element\HtmlInline;
19use League\CommonMark\Inline\Renderer\HtmlInlineRenderer;
20
21final class DisallowedRawHtmlExtension implements ExtensionInterface
22{
23    public function register(ConfigurableEnvironmentInterface $environment)
24    {
25        $environment->addBlockRenderer(HtmlBlock::class, new DisallowedRawHtmlBlockRenderer(new HtmlBlockRenderer()), 50);
26        $environment->addInlineRenderer(HtmlInline::class, new DisallowedRawHtmlInlineRenderer(new HtmlInlineRenderer()), 50);
27    }
28}
29