/parsedown

Parser for Markdown

Primary LanguagePHPMIT LicenseMIT

Parsedown PHP

Parsedown is a parser for Markdown. It parses Markdown text the way people do. First, it divides texts into blocks. Then it looks at how these blocks start and how they relate to each other. Finally, it looks for special characters to identify inline elements. As a result, Parsedown is (super) fast, consistent and clean.

Explorer (demo)
Tests

Installation

Include Parsedown.php or install the composer package.

Example

$text = 'Hello **Parsedown**!';

$result = Parsedown::instance()->parse($text);

echo $result; # prints: <p>Hello <strong>Parsedown</strong>!</p>