Copied!

Converts CommonMark-compatible Markdown to HTML.

CloneableFinalInstantiable
Methods
public __construct(array $config = [])
 

Create a new Markdown converter pre-configured for CommonMark

  • param array<string,mixed> $config
public League\CommonMark\MarkdownConverter::__invoke(string $markdown) : League\CommonMark\Output\RenderedContentInterface
 

Converts CommonMark to HTML.

  • see \MarkdownConverter::convert()
  • throws \CommonMarkException
public League\CommonMark\MarkdownConverter::convert(string $input) : League\CommonMark\Output\RenderedContentInterface
 

Converts Markdown to HTML.

  • param string $input The Markdown to convert
  • return \RenderedContentInterface Rendered HTML
  • throws \CommonMarkException
public League\CommonMark\MarkdownConverter::convertToHtml(string $markdown) : League\CommonMark\Output\RenderedContentInterface
 

Converts Markdown to HTML.

  • deprecated since 2.2; use {@link convert()} instead
  • param string $markdown The Markdown to convert
  • return \RenderedContentInterface Rendered HTML
  • throws \CommonMarkException
public getEnvironment() : League\CommonMark\Environment\Environment
Properties
protected League\CommonMark\Environment\EnvironmentInterface League\CommonMark\MarkdownConverter::$environment
 
  • psalm-readonly
protected League\CommonMark\Renderer\MarkdownRendererInterface League\CommonMark\MarkdownConverter::$htmlRenderer
 
  • psalm-readonly
protected League\CommonMark\Parser\MarkdownParserInterface League\CommonMark\MarkdownConverter::$markdownParser
 
  • psalm-readonly
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration