Change snip content text rebuilding to static, allowing a lot cleaner interface getting the lastest text
This commit is contained in:
@ -13,9 +13,7 @@ use Symfony\Component\Routing\Attribute\Route;
|
||||
#[Route('/content', name: 'content')]
|
||||
class SnipContentController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly SnipContentService $contentService,
|
||||
) {}
|
||||
public function __construct() {}
|
||||
|
||||
#[Route('/compare/{to}/{from}', name: '_compare')]
|
||||
public function compare(SnipContent $to, ?SnipContent $from = null): Response
|
||||
@ -27,8 +25,8 @@ class SnipContentController extends AbstractController
|
||||
}
|
||||
|
||||
$diff = MyersDiff::buildDiffLines(
|
||||
$this->contentService->rebuildText($from),
|
||||
$this->contentService->rebuildText($to),
|
||||
SnipContentService::rebuildText($from),
|
||||
SnipContentService::rebuildText($to),
|
||||
);
|
||||
|
||||
return $this->render('content/compare.html.twig', [
|
||||
|
Reference in New Issue
Block a user