protected function MarkdownExtra::_doAbbreviations_callback in Markdown 7
* Callback for processing abbreviations *
Parameters
array $matches: * @return string
File
- includes/
MarkdownExtra.php, line 1771
Class
- MarkdownExtra
- Markdown Extra Parser Class
Namespace
MichelfCode
protected 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];
}
}