Skip to content

Commit

Permalink
Change convertToHtml() to convert() because convertToHtml() has been …
Browse files Browse the repository at this point in the history
…deprecated since commonmark 2.2.
  • Loading branch information
emergencyreports authored Feb 22, 2024
1 parent 1d10c98 commit f04060e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())]
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ContentParsers/MarkdownParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/ContentParsers/MarkdownWithFrontMatterParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit f04060e

Please sign in to comment.