We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbc3377 commit 779fdd0Copy full SHA for 779fdd0
extra/markdown-extra/LeagueMarkdown.php
@@ -16,14 +16,20 @@
16
class LeagueMarkdown implements MarkdownInterface
17
{
18
private $converter;
19
+ private $legacySupport;
20
21
public function __construct(CommonMarkConverter $converter = null)
22
23
$this->converter = $converter ?: new CommonMarkConverter();
24
+ $this->legacySupport = !method_exists($this->converter, 'convert');
25
}
26
27
public function convert(string $body): string
28
- return $this->converter->convertToHtml($body);
29
+ if ($this->legacySupport) {
30
+ return $this->converter->convertToHtml($body);
31
+ }
32
+
33
+ return $this->converter->convert($body);
34
35
0 commit comments