function MarkdownExtra_Parser::_doAbbreviations_callback in Markdown 5
Same name and namespace in other branches
- 6 markdown.php \MarkdownExtra_Parser::_doAbbreviations_callback()
File
- ./
markdown.php, line 2790
Class
Code
function _doAbbreviations_callback($matches) {
$abbr = $matches[0];
if (isset($this->abbr_desciptions[$abbr])) {
$desc = $this->abbr_desciptions[$abbr];
if (empty($desc)) {
return $this
->hashPart("<abbr>{$abbr}</abbr>");
}
else {
$desc = $this
->encodeAttribute($desc);
return $this
->hashPart("<abbr title=\"{$desc}\">{$abbr}</abbr>");
}
}
else {
return $matches[0];
}
}