Archived
1
0
Fork 0

Formatting fixes and cleanup.

This commit is contained in:
Henrik Hautakoski 2023-01-31 07:34:02 +01:00
parent a1e14a3e60
commit 51fb71e469
41 changed files with 394 additions and 392 deletions

View file

@ -10,7 +10,7 @@ class CardText extends Component
{
protected Card $card;
protected string $subject;
protected string $subject;
/**
* Create a new component instance.
@ -20,7 +20,7 @@ class CardText extends Component
public function __construct(Card $card, $subject = '')
{
$this->card = $card;
$this->subject = strlen($subject) ? $subject : $card->subject;
$this->subject = strlen($subject) ? $subject : $card->subject;
}
/**
@ -34,9 +34,10 @@ class CardText extends Component
// Replace non escaped '?' with subject and also Unescape escaped '?'
$text = preg_replace(
['/(?<!\\\\)\?/u', '/\\\\\\?/u'] ,
['/(?<!\\\\)\?/u', '/\\\\\\?/u'],
["<strong>$subject</strong>", '?'],
$this->card->body);
$this->card->body
);
return $text;
}