src/Ciconia/Extension/Gfm/TableExtension.php
protected function createView(Collection $headerCells, Collection $bodyRows)
    {
        $tHeadRow = new Tag('tr');
        $tHeadRow->setText("\n" . $headerCells->join("\n") . "\n");

        $tHead = new Tag('thead');
        $tHead->setText("\n" . $tHeadRow . "\n");

        $tBody = new Tag('tbody');

        $bodyRows->apply(function (Collection $row) use (&$options) {
            $tr = new Tag('tr');
            $tr->setText("\n" . $row->join("\n") . "\n");

            return $tr;
        });

        $tBody->setText("\n" .$bodyRows->join("\n") . "\n");

        $table = new Tag('table');
        $table->setText("\n" . $tHead . "\n" . $tBody . "\n");

        return new Text($table->render());
    }
protected function createView(Collection $headerCells, Collection $bodyRows)
    {
        $tHeadRow = new Tag('tr');
        $tHeadRow->setText("\n" . $headerCells->join("\n") . "\n");

        $tHead = new Tag('thead');
        $tHead->setText("\n" . $tHeadRow . "\n");

        $tBody = new Tag('tbody');

        $bodyRows->apply(function (Collection $row) use (&$options) {
            $tr = new Tag('tr');
            $tr->setText("\n" . $row->join("\n") . "\n");

            return $tr;
        });

        $tBody->setText("\n" .$bodyRows->join("\n") . "\n");

        $table = new Tag('table');
        $table->setText("\n" . $tHead . "\n" . $tBody . "\n");

        return new Text($table->render());
    }
@param Collection $headerCells
@param Collection $bodyRows

@return Text