public function render(Node $node, $text) { $alt = $node->getAttribute('alt'); $src = $node->getAttribute('src'); $title = $this->getOptionalTitle($node->getAttribute('title')); return "![{$alt}]({$src}{$title})"; }
public function render(Node $node, $text) { $href = $node->getAttribute('href'); $text = $node->getText(); return "[{$text}]({$href})"; }