Fix: No need to format an empty string
This commit is contained in:
parent
53b94e856c
commit
604eee1ba7
|
@ -43,6 +43,10 @@ public function __construct(protected string $source)
|
||||||
*/
|
*/
|
||||||
public function render(): string
|
public function render(): string
|
||||||
{
|
{
|
||||||
|
if (empty($this->source)) {
|
||||||
|
return $this->source;
|
||||||
|
}
|
||||||
|
|
||||||
$hash = md5($this->source);
|
$hash = md5($this->source);
|
||||||
$cacheKey = sprintf('markdown_formatted_%s', $hash);
|
$cacheKey = sprintf('markdown_formatted_%s', $hash);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user