From 9b1a5b8907911972e9e8f2b02d3f2606d15b55d9 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 28 Aug 2024 09:53:43 +1000 Subject: [PATCH] Formatting --- app/Markdown/ConfigureHeadingLinks.php | 5 ++--- app/Markdown/GithubFlavoredMarkdownConverter.php | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Markdown/ConfigureHeadingLinks.php b/app/Markdown/ConfigureHeadingLinks.php index 6470f5f8..e252c52a 100644 --- a/app/Markdown/ConfigureHeadingLinks.php +++ b/app/Markdown/ConfigureHeadingLinks.php @@ -9,9 +9,9 @@ class ConfigureHeadingLinks { - public function __invoke(DocumentParsedEvent $event): void + public function __invoke(DocumentParsedEvent $documentParsedEvent): void { - $walker = $event->getDocument()->walker(); + $walker = $documentParsedEvent->getDocument()->walker(); while ($event = $walker->next()) { [$paragraph, $heading, $linkOpener, $linkCloser] = [ @@ -48,4 +48,3 @@ public function __invoke(DocumentParsedEvent $event): void } } } - diff --git a/app/Markdown/GithubFlavoredMarkdownConverter.php b/app/Markdown/GithubFlavoredMarkdownConverter.php index 641aec51..9aca2267 100644 --- a/app/Markdown/GithubFlavoredMarkdownConverter.php +++ b/app/Markdown/GithubFlavoredMarkdownConverter.php @@ -38,9 +38,7 @@ public function __construct(array $config = []) $environment->addExtension(new AttributesExtension()); $environment->addExtension(new TorchlightExtension()); - $environment->addRenderer(BlockQuote::class, new BlockQuoteRenderer()); - - + $environment->addRenderer(BlockQuote::class, new BlockQuoteRenderer); $environment->addEventListener(DocumentParsedEvent::class, new ConfigureHeadingLinks); parent::__construct($environment);