Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 13... Zeile 13...
13
 
13
 
Zeile 14... Zeile 14...
14
namespace League\CommonMark\Xml;
14
namespace League\CommonMark\Xml;
15
 
15
 
-
 
16
use League\CommonMark\ConverterInterface;
16
use League\CommonMark\ConverterInterface;
17
use League\CommonMark\Environment\EnvironmentInterface;
17
use League\CommonMark\Environment\EnvironmentInterface;
18
use League\CommonMark\Exception\CommonMarkException;
18
use League\CommonMark\Output\RenderedContentInterface;
19
use League\CommonMark\Output\RenderedContentInterface;
19
use League\CommonMark\Parser\MarkdownParser;
20
use League\CommonMark\Parser\MarkdownParser;
Zeile 35... Zeile 36...
35
    }
36
    }
Zeile 36... Zeile 37...
36
 
37
 
37
    /**
38
    /**
38
     * Converts Markdown to XML
39
     * Converts Markdown to XML
39
     *
40
     *
40
     * @throws \RuntimeException
41
     * @throws CommonMarkException
41
     */
42
     */
42
    public function convert(string $input): RenderedContentInterface
43
    public function convert(string $input): RenderedContentInterface
43
    {
44
    {
44
        return $this->renderer->renderDocument($this->parser->parse($input));
45
        return $this->renderer->renderDocument($this->parser->parse($input));
Zeile 47... Zeile 48...
47
    /**
48
    /**
48
     * Converts CommonMark to HTML.
49
     * Converts CommonMark to HTML.
49
     *
50
     *
50
     * @see MarkdownToXmlConverter::convert()
51
     * @see MarkdownToXmlConverter::convert()
51
     *
52
     *
52
     * @throws \RuntimeException
53
     * @throws CommonMarkException
53
     */
54
     */
54
    public function __invoke(string $input): RenderedContentInterface
55
    public function __invoke(string $input): RenderedContentInterface
55
    {
56
    {
56
        return $this->convert($input);
57
        return $this->convert($input);
57
    }
58
    }