Skip to content

Commit

Permalink
Merge pull request #705 from scottcharlesworth/commonmark-renderers
Browse files Browse the repository at this point in the history
CommonMark Renderer
  • Loading branch information
damiani authored May 16, 2024
2 parents 18c85b5 + 1b62600 commit 6a79185
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 6a79185

Please sign in to comment.