123456789101112131415 |
- <?php
- namespace App\Markdown;
- use League\CommonMark\Environment\EnvironmentBuilderInterface;
- use League\CommonMark\Extension\ExtensionInterface;
- class ColorExtension implements ExtensionInterface
- {
- public function register(EnvironmentBuilderInterface $environment): void
- {
- $environment->addInlineParser(new ColorParser(), 200);
- $environment->addRenderer(ColorText::class, new ColorRenderer());
- }
- }
|