friendica/src/Content/Text/MarkdownParser.php
Hypolite Petovan 4d70e32829 Add new Content\Text\MarkdownParser
- Add autolinker to MarkdownParser->doAutoLinks()
- Set hashtag_protection and url_filter_func properties of MarkdownParser
2019-03-09 23:28:50 -05:00

18 lines
No EOL
373 B
PHP

<?php
namespace Friendica\Content\Text;
use Friendica\Util\Strings;
use Michelf\MarkdownExtra;
class MarkdownParser extends MarkdownExtra
{
protected function doAutoLinks($text)
{
$text = parent::doAutoLinks($text);
$text = preg_replace_callback(Strings::autoLinkRegEx(),
array($this, '_doAutoLinks_url_callback'), $text);
return $text;
}
}