/**
* @param string $mediaType
* @return mixed
*/
protected function getElementParts($mediaType)
{
$label = trim($this->cursor->match('/^\\[(?:[^\\\\\\[\\]]|\\\\[\\[\\]]){0,750}\\]/'), '[]');
$url = trim(LinkParserHelper::parseLinkDestination($this->cursor), '()');
if ($label === null || $url === null) {
return $this->cancel();
}
return $this->getElement($mediaType, $label, $url);
}