Fix styling

This commit is contained in:
ManukMinasyan
2026-03-31 21:31:05 +00:00
committed by github-actions[bot]
parent f9f9950cde
commit bbba63c57b
3 changed files with 5 additions and 5 deletions

View File

@@ -19,10 +19,10 @@ use Relaticle\Comments\Events\CommentUpdated;
use Relaticle\Comments\Mentions\MentionParser;
use Relaticle\Comments\Models\Comment;
class CommentItem extends Component implements HasForms, HasActions
class CommentItem extends Component implements HasActions, HasForms
{
use InteractsWithForms;
use InteractsWithActions;
use InteractsWithForms;
use WithFileUploads;
public Comment $comment;

View File

@@ -21,10 +21,10 @@ use Relaticle\Comments\Mentions\MentionParser;
use Relaticle\Comments\Models\Comment;
use Relaticle\Comments\Models\Subscription;
class Comments extends Component implements HasForms, HasActions
class Comments extends Component implements HasActions, HasForms
{
use InteractsWithForms;
use InteractsWithActions;
use InteractsWithForms;
use WithFileUploads;
public Model $model;

View File

@@ -152,7 +152,7 @@ class Comment extends Model
$escapedName = e($name);
$styledSpan = '<span class="comment-mention">@'.$escapedName.'</span>';
$pattern = '/<(?:span|a)[^>]*data-type="mention"[^>]*>@?' . preg_quote($escapedName, '/') . '<\/(?:span|a)>/';
$pattern = '/<(?:span|a)[^>]*data-type="mention"[^>]*>@?'.preg_quote($escapedName, '/').'<\/(?:span|a)>/';
if (preg_match($pattern, $body)) {
$body = preg_replace($pattern, $styledSpan, $body);