- Add support for Mastodon username mentions - Add test for parsing Mastodon usernames in notes - Modify namespace and class imports for `MentionGenerator` and `MentionRenderer` in `Note.php` - Rename `ContactMentionGenerator.php` to `MentionGenerator.php`
17 lines
420 B
PHP
17 lines
420 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\CommonMark\Generators;
|
|
|
|
use League\CommonMark\Extension\Mention\Generator\MentionGeneratorInterface;
|
|
use League\CommonMark\Extension\Mention\Mention;
|
|
use League\CommonMark\Node\Inline\AbstractInline;
|
|
|
|
class MentionGenerator implements MentionGeneratorInterface
|
|
{
|
|
public function generateMention(Mention $mention): ?AbstractInline
|
|
{
|
|
return $mention;
|
|
}
|
|
}
|