| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
declare(strict_types=1);
|
|
|
4 |
|
|
|
5 |
/*
|
|
|
6 |
* This file is part of the league/commonmark package.
|
|
|
7 |
*
|
|
|
8 |
* (c) Colin O'Dell <colinodell@gmail.com>
|
|
|
9 |
*
|
|
|
10 |
* For the full copyright and license information, please view the LICENSE
|
|
|
11 |
* file that was distributed with this source code.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
namespace League\CommonMark\Parser;
|
|
|
15 |
|
|
|
16 |
use League\CommonMark\Parser\Block\BlockContinueParserInterface;
|
|
|
17 |
|
|
|
18 |
interface MarkdownParserStateInterface
|
|
|
19 |
{
|
|
|
20 |
/**
|
|
|
21 |
* Returns the deepest open block parser
|
|
|
22 |
*/
|
|
|
23 |
public function getActiveBlockParser(): BlockContinueParserInterface;
|
|
|
24 |
|
|
|
25 |
/**
|
|
|
26 |
* Open block parser that was last matched during the continue phase. This is different from the currently active
|
|
|
27 |
* block parser, as an unmatched block is only closed when a new block is started.
|
|
|
28 |
*/
|
|
|
29 |
public function getLastMatchedBlockParser(): BlockContinueParserInterface;
|
|
|
30 |
|
|
|
31 |
/**
|
|
|
32 |
* Returns the current content of the paragraph if the matched block is a paragraph. The content can be multiple
|
|
|
33 |
* lines separated by newlines.
|
|
|
34 |
*/
|
|
|
35 |
public function getParagraphContent(): ?string;
|
|
|
36 |
}
|