Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
36 | 90 | public function parse(InlineParserContext $inlineContext) |
|
37 | { |
||
38 | 90 | $cursor = $inlineContext->getCursor(); |
|
39 | 90 | if ($cursor->peek() === '[') { |
|
40 | 81 | $cursor->advanceBy(2); |
|
41 | 81 | $node = new Text('![', ['delim' => true]); |
|
42 | 81 | $inlineContext->getContainer()->appendChild($node); |
|
43 | |||
44 | // Add entry to stack for this opener |
||
45 | 81 | $delimiter = new Delimiter('!', 1, $node, true, false, $cursor->getPosition()); |
|
46 | 81 | $inlineContext->getDelimiterStack()->push($delimiter); |
|
47 | |||
48 | 81 | return true; |
|
49 | } |
||
50 | |||
51 | 9 | return false; |
|
52 | } |
||
53 | } |
||
54 |