for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the league/commonmark-extras package.
*
* (c) Colin O'Dell <[email protected]>
* Original code based on the CommonMark JS reference parser (http://bitly.com/commonmark-js)
* - (c) John MacFarlane
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\CommonMark\Extras\TwitterHandleAutolink;
use League\CommonMark\Block\Renderer as CoreBlockRenderer;
use League\CommonMark\Extension\Extension;
use League\CommonMark\Inline\Renderer as CoreInlineRenderer;
class TwitterHandleAutolinkExtension extends Extension
{
/**
* {@inheritdoc}
public function getInlineParsers()
return [
new TwitterHandleParser(),
];
}
public function getBlockRenderers()
'League\CommonMark\Block\Element\Document' => new CoreBlockRenderer\DocumentRenderer(),
'League\CommonMark\Block\Element\Paragraph' => new CoreBlockRenderer\ParagraphRenderer(),
public function getInlineRenderers()
'League\CommonMark\Inline\Element\Text' => new CoreInlineRenderer\TextRenderer(),
'League\CommonMark\Inline\Element\Link' => new CoreInlineRenderer\LinkRenderer(),