Skip to content

Commit

Permalink
Add renderers from config
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcharlesworth committed May 15, 2024
1 parent 18c85b5 commit 1b62600
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Parsers/CommonMarkParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public function __construct()
new TableExtension,
]))->map(fn ($extension) => $environment->addExtension($extension));

collect(
Arr::get(app('config'), 'commonmark.renderers')
)->map(fn ($renderer, $nodeClass) => $environment->addRenderer($nodeClass, $renderer));

$this->converter = new MarkdownConverter($environment);
}

Expand Down

0 comments on commit 1b62600

Please sign in to comment.