Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function parse(InlineParserContext $inlineContext): bool |
||
20 | { |
||
21 | $route = $inlineContext->getFullMatch(); |
||
22 | |||
23 | // Push the cursor to the lenght of the full match. |
||
24 | $inlineContext->getCursor()->advanceBy(\strlen($route)); |
||
25 | |||
26 | $content = "{$inlineContext->getMatches()[1]}#{$inlineContext->getMatches()[5]}"; |
||
27 | |||
28 | |||
29 | $inlineContext->getContainer() |
||
30 | ->appendChild(new GithubPullRequest( |
||
31 | $content, |
||
32 | [ |
||
33 | 'attributes' => [ |
||
34 | 'href' => $route, |
||
35 | 'data-toggle' => 'tooltip', |
||
36 | 'title' => $content |
||
37 | ] |
||
38 | ] |
||
39 | )); |
||
40 | |||
41 | return true; |
||
42 | } |
||
44 |