Skip to content

Commit

Permalink
Remove protected Context::addChild() method
Browse files Browse the repository at this point in the history
It was a duplicate of the Context::addBlock() method
  • Loading branch information
colinodell committed Sep 27, 2015
1 parent d22d6a6 commit 61b07c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## [Unreleased][unreleased]

## Removed
- Removed protected function Context::addChild()
- It was a duplicate of the Context::addBlock() method

## [0.11.3] - 2015-09-25
## Fixed
- Reset container after closing containing lists (#183; jgm/commonmark.js#67)
Expand Down
20 changes: 0 additions & 20 deletions src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,6 @@ public function setNextLine($line)
$this->line = $line;
}

/**
* @param AbstractBlock $newBlock
*
* @return AbstractBlock
*/
protected function addChild(AbstractBlock $newBlock)
{
$this->getBlockCloser()->closeUnmatchedBlocks();
$newBlock->setStartLine($this->lineNumber);
while (!$this->tip->canContain($newBlock)) {
$this->tip->finalize($this);
}

$this->tip->appendChild($newBlock);
$this->tip = $newBlock;
$this->container = $newBlock;

return $newBlock;
}

/**
* @return Document
*/
Expand Down

0 comments on commit 61b07c4

Please sign in to comment.