Skip to content

Commit

Permalink
Merge pull request #77 from emergencyreports/main
Browse files Browse the repository at this point in the history
Change convertToHtml() to convert() because convertToHtml() has been deprecated since commonmark 2.2.
  • Loading branch information
freekmurze committed Feb 22, 2024
2 parents 1d10c98 + f04060e commit 52ea930
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 52ea930

Please sign in to comment.