diff --git a/README.md b/README.md index 88f6aba..e5b1db9 100644 --- a/README.md +++ b/README.md @@ -340,7 +340,7 @@ class MarkdownWithFrontMatterParser implements ContentParser return array_merge( $document->matter(), - ['contents' => $this->commonMarkConverter->convertToHtml($document->body())] + ['contents' => $this->commonMarkConverter->convert($document->body())] ); } } diff --git a/src/ContentParsers/MarkdownParser.php b/src/ContentParsers/MarkdownParser.php index 762698f..1d8dd3e 100644 --- a/src/ContentParsers/MarkdownParser.php +++ b/src/ContentParsers/MarkdownParser.php @@ -18,7 +18,7 @@ public function __construct(CommonMarkConverter $commonMarkConverter) public function parse(string $contents): array { - $htmlContents = $this->commonMarkConverter->convertToHtml($contents); + $htmlContents = $this->commonMarkConverter->convert($contents); return [ 'contents' => new HtmlString($htmlContents), diff --git a/src/ContentParsers/MarkdownWithFrontMatterParser.php b/src/ContentParsers/MarkdownWithFrontMatterParser.php index 4b6da19..aae3362 100644 --- a/src/ContentParsers/MarkdownWithFrontMatterParser.php +++ b/src/ContentParsers/MarkdownWithFrontMatterParser.php @@ -21,7 +21,7 @@ public function parse(string $contents): array { $document = YamlFrontMatter::parse($contents); - $htmlContents = $this->commonMarkConverter->convertToHtml($document->body()); + $htmlContents = $this->commonMarkConverter->convert($document->body()); return array_merge( $document->matter(),