Formatting fixes and cleanup.
This commit is contained in:
parent
a1e14a3e60
commit
51fb71e469
41 changed files with 394 additions and 392 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue