function render(HatenaSyntax_Node $rootnode, $id) { $treeroot = HatenaSyntax_Tree::make($this->filter($rootnode)); $this->headerCount = 0; $this->id = $id; $renderer = new HatenaSyntax_TreeRenderer(array($this, 'renderHeader')); return '<div class="toc">' . $renderer->render($treeroot) . '</div>'; }
static function normalizeList(array $data) { return HatenaSyntax_Tree::make($data); }