public function convert(ElementInterface $element)
{
$value = $element->getValue();
$markdown = '';
$lines = preg_split('/\\r\\n|\\r|\\n/', $value);
foreach ($lines as $line) {
/*
* Some special characters need to be escaped based on the position that they appear
* The following function will deal with those special cases.
*/
$markdown .= $this->escapeSpecialCharacters($line);
$markdown .= "\n";
}
return trim($markdown) !== '' ? rtrim($markdown) . "\n\n" : '';
}