Skip to content

Commit

Permalink
update markdownextra to markdowntoc
Browse files Browse the repository at this point in the history
  • Loading branch information
bangnokia committed Apr 7, 2021
1 parent 78cd34b commit 3d7921f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/MarkdownParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace App;

use ParsedownExtra;
use ParsedownToC;

class MarkdownParser implements MarkdownParserInterface
{
protected ParsedownExtra $driver;
protected ParsedownToC $driver;

public function __construct()
{
$this->driver = new ParsedownExtra();
$this->driver = new ParsedownToC();
}

public function parse(string $text): string
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"erusev/parsedown": "^1.7",
"erusev/parsedown-extra": "^0.8.1",
"illuminate/view": "^8.0",
"keinos/parsedown-toc": "^1.1",
"laravel-zero/framework": "^8.0",
"yosymfony/resource-watcher": "^3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
);

$this->assertEquals('foo', $result['title']);
$this->assertEquals('<h1>hello</h1>', $result['content']);
$this->assertEquals('<h1 id="hello" name="hello">hello</h1>', $result['content']);
});

0 comments on commit 3d7921f

Please sign in to comment.