Devs.site

Parsedown, Markdown Parser in PHP

Markdown is a writing format widely used in blogging platforms for its simple syntax and low impact on performance when parsing it. At some point you will need to convert it into HTML code that a browser can render. There are quite a few libraries that will fulfill your need but if you want something that can just be hooked in and used without required dependencies or any other complications, Parsedown is all you need.


You can incorporate it into your project through Composer or just copy the class and add it to your code (minding the license, of course). Parsedown analyzes the lines of texts and identifies the different types of blocks by the start of these lines. Once every block is identified, it parses the inline elements. Piece of cake. It also has methods for escaping the HTML output.

You will find that big names like Laravel, phpDocumentator and a bunch of CMS solutions have adopted it.


Links


Requirements


Features

0 comments

Specify your e-mail if you want to receive notifications about new comments and replies