Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Aug 27, 2024
1 parent b9581ae commit 9b1a5b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions app/Markdown/ConfigureHeadingLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [
Expand Down Expand Up @@ -48,4 +48,3 @@ public function __invoke(DocumentParsedEvent $event): void
}
}
}

4 changes: 1 addition & 3 deletions app/Markdown/GithubFlavoredMarkdownConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9b1a5b8

Please sign in to comment.