Merge branch 'master' of git://github.com/derflocki/php-markdown into extra

This commit is contained in:
Michel Fortin 2013-11-28 21:08:04 -05:00
commit 4742d28fab

View file

@ -1479,9 +1479,16 @@ class Markdown_Parser {
>
}xi',
array(&$this, '_doAutoLinks_email_callback'), $text);
$text = preg_replace_callback('{<(tel:([^\'">\s]+))>}i',array(&$this, '_doAutoLinks_tel_callback'), $text);
return $text;
}
function _doAutoLinks_tel_callback($matches) {
$url = $this->encodeAttribute($matches[1]);
$tel = $this->encodeAttribute($matches[2]);
$link = "<a href=\"$url\">$tel</a>";
return $this->hashPart($link);
}
function _doAutoLinks_url_callback($matches) {
$url = $this->encodeAttribute($matches[1]);
$link = "<a href=\"$url\">$url</a>";