getAttribute('src')); $alt = LinkSyntax::escapeText($element->getAttribute('alt')); $title = LinkSyntax::escapeText($element->getAttribute('title')); if ($title !== '') { // No newlines added. should be in a block-level element. // Without a destination, the title would be taken as one. return '![' . $alt . '](' . ($src === '' ? '<>' : $src) . ' "' . $title . '")'; } return '![' . $alt . '](' . $src . ')'; } /** * @return string[] */ public function getSupportedTags(): array { return ['img']; } }