init
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled

This commit is contained in:
jiangdong.cheng
2026-02-11 17:28:36 +08:00
parent dcb82557c7
commit aa16c9f8c2
162 changed files with 22333 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace App\Support;
use Illuminate\Support\Str;
class MarkdownRenderer
{
public function render(?string $content): string
{
$markdown = trim((string) $content);
if ($markdown === '') {
return '';
}
return (string) Str::markdown($markdown, [
'html_input' => 'strip',
'allow_unsafe_links' => false,
]);
}
}