Parsedown Extra

repository·master·Indexed 21 days ago

https://github.com/erusev/parsedown-extra

A PHP extension for the Parsedown library that adds support for Markdown Extra features, including attribute syntax for HTML elements.

Tokens
187
Snippets
2
Records
2
Agent score
24%

What's inside parsedown-extra

  1. Install Parsedown Extra

    master

    You can install Parsedown Extra using Composer or by manually including the required files in your project. Note that Parsedown Extra is an extension of Parsedown, so both files must be available.

    composer require erusev/parsedown-extra
  2. Use ParsedownExtra to parse Markdown

    master

    To use the extension, instantiate the ParsedownExtra class and call the text() method. This provides support for Markdown Extra features, such as adding CSS classes to headers using the {.class} syntax.

    $Extra = new ParsedownExtra();
    
    echo $Extra->text('# Header {.sth}'); // prints: <h1 class="sth">Header</h1>