Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinHassan committed Dec 19, 2021
1 parent 5b20e13 commit 64a7d8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ CLI Markdown Renderer
<?php
require_once 'vendor/autoload.php';

use League\CommonMark\DocParser;
use League\CommonMark\Environment;
use AydinHassan\CliMdRenderer\CliRendererFactory;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Parser\MarkdownParser;

$parser = new MarkdownParser((new Environment())->addExtension(new CommonMarkCoreExtension()));
$parser = new DocParser(Environment::createCommonMarkEnvironment());
$cliRenderer = (new CliRendererFactory)->__invoke();
$ast = $parser->parse(file_get_contents('path/to/file.md'));
Expand Down

0 comments on commit 64a7d8c

Please sign in to comment.