Implement markdown link replacement with snip url

This commit is contained in:
Tim
2025-04-24 18:16:44 +02:00
parent c1b896a63a
commit d7e558cae9
2 changed files with 40 additions and 2 deletions

View File

@ -25,14 +25,14 @@ class SnipTwigExtension extends AbstractExtension
];
}
function snipPath(int $id): string
private function snipPath(int $id): string
{
return $this->router->generate('snip_single', [
'snip' => $id,
]);
}
function snipLink(int $id): string
private function snipLink(int $id): string
{
$snip = $this->snipRepo->find($id);
if ($snip === null) {