Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
MarkdownConverter
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Hyde\Markdown;
6
7use League\CommonMark\Environment\Environment;
8use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
9
10/**
11 * The base Markdown converter class.
12 */
13class MarkdownConverter extends \League\CommonMark\MarkdownConverter
14{
15    /**
16     * Create a new Markdown converter pre-configured for CommonMark.
17     *
18     * @param  array<string, mixed>  $config
19     */
20    public function __construct(array $config = [])
21    {
22        $environment = new Environment($config);
23        $environment->addExtension(new CommonMarkCoreExtension());
24
25        parent::__construct($environment);
26    }
27}