jonnybarnes.uk/app/CommonMark/Generators/MentionGenerator.php
Jonny Barnes 05c63b241d
feat: Refactor mention rendering and generator classes
- 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`
2023-11-19 17:22:02 +00:00

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;
}
}