League\CommonMark\Block\Element\FencedCode::finalize PHP Method

finalize() public method

public finalize ( League\CommonMark\ContextInterface $context, $endLineNumber )
$context League\CommonMark\ContextInterface
    public function finalize(ContextInterface $context, $endLineNumber)
    {
        parent::finalize($context, $endLineNumber);
        // first line becomes info string
        $this->info = RegexHelper::unescape(trim($this->strings->first()));
        if ($this->strings->count() === 1) {
            $this->finalStringContents = '';
        } else {
            $this->finalStringContents = implode("\n", $this->strings->slice(1)) . "\n";
        }
    }