Create a customized myers diff based system for snip content
This commit is contained in:
@ -5,6 +5,7 @@ namespace App\Service\SnipParser\Stages;
|
||||
use App\Repository\SnipContentRepository;
|
||||
use App\Repository\SnipRepository;
|
||||
use App\Security\Voter\SnipVoter;
|
||||
use App\Service\SnipContent\SnipContentService;
|
||||
use App\Service\SnipParser\Pipeline;
|
||||
use League\Pipeline\StageInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
@ -17,6 +18,7 @@ class IncludeReferenceStage implements StageInterface
|
||||
#[Autowire(lazy: true)] private readonly SnipRepository $snipRepository,
|
||||
#[Autowire(lazy: true)] private readonly SnipContentRepository $snipContentRepository,
|
||||
#[Autowire(lazy: true)] private readonly Pipeline $pipeline,
|
||||
#[Autowire(lazy: true)] private readonly SnipContentService $snipContentService,
|
||||
) {}
|
||||
|
||||
public function __invoke(mixed $payload): string
|
||||
@ -51,7 +53,9 @@ class IncludeReferenceStage implements StageInterface
|
||||
return sprintf('<span title="access denied">%s</span>', $matches[0]);
|
||||
}
|
||||
|
||||
return $this->pipeline->parse($content->getText());
|
||||
return $this->pipeline->parse(
|
||||
$this->snipContentService->rebuildText($content)
|
||||
);
|
||||
}, $payload);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user