src/Peach/Markup/DefaultContext.php
private function checkBreakModeInComment(Comment $comment)
    {
        $nodes = $comment->getChildNodes();
        switch (count($nodes)) {
            case 0:
                return false;
            case 1:
                $node = $nodes[0];
                if ($node instanceof Comment) {
                    return $this->checkBreakModeInComment($node);
                }
                
                return ($node instanceof Element);
            default:
                return true;
        }
    }
private function checkBreakModeInComment(Comment $comment)
    {
        $nodes = $comment->getChildNodes();
        switch (count($nodes)) {
            case 0:
                return false;
            case 1:
                $node = $nodes[0];
                if ($node instanceof Comment) {
                    return $this->checkBreakModeInComment($node);
                }
                
                return ($node instanceof Element);
            default:
                return true;
        }
    }
コメントノードを 1 行 ("<--foobar-->") で記述するか改行するかの判定を行います.

@param  Comment $comment
@return bool