League\CommonMark\UnmatchedBlockCloser::closeUnmatchedBlocks PHP Method

closeUnmatchedBlocks() public method

    public function closeUnmatchedBlocks()
    {
        while ($this->oldTip !== $this->lastMatchedContainer) {
            $oldTip = $this->oldTip->parent();
            $this->oldTip->finalize($this->context, $this->context->getLineNumber() - 1);
            $this->oldTip = $oldTip;
        }
    }