League\CommonMark\Context::replaceContainerBlock PHP Method

replaceContainerBlock() public method

public replaceContainerBlock ( AbstractBlock $replacement )
$replacement League\CommonMark\Block\Element\AbstractBlock
    public function replaceContainerBlock(AbstractBlock $replacement)
    {
        $this->getBlockCloser()->closeUnmatchedBlocks();
        $this->getContainer()->replaceWith($replacement);
        if ($this->getTip() === $this->getContainer()) {
            $this->setTip($replacement);
        }
        $this->setContainer($replacement);
    }