PHPackages                             jbroadway/slimdown - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jbroadway/slimdown

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

jbroadway/slimdown
==================

A simple regex-based Markdown parser.

1.0.6-stable(1y ago)357.7k↓50%7[1 PRs](https://github.com/jbroadway/slimdown/pulls)MITPHPPHP &gt;=7.2

Since Feb 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/jbroadway/slimdown)[ Packagist](https://packagist.org/packages/jbroadway/slimdown)[ Docs](https://github.com/jbroadway/slimdown)[ RSS](/packages/jbroadway-slimdown/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

Slimdown
========

[](#slimdown)

[![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/8153ef2ead8a3b4273375dda80126b5ce05a90fd54480427ef9145538043001e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a62726f61647761792f736c696d646f776e2f63692e796d6c3f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/8153ef2ead8a3b4273375dda80126b5ce05a90fd54480427ef9145538043001e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a62726f61647761792f736c696d646f776e2f63692e796d6c3f6272616e63683d6d6173746572)[![GitHub License](https://camo.githubusercontent.com/69e9e44b83faf60377428d714b9a2b32ab29b7ae63f68d96448399daa50fb1f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a62726f61647761792f736c696d646f776e)](https://camo.githubusercontent.com/69e9e44b83faf60377428d714b9a2b32ab29b7ae63f68d96448399daa50fb1f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a62726f61647761792f736c696d646f776e)[![Packagist Version](https://camo.githubusercontent.com/6a287c32c464e7d05895fdb3f5af9e4517eab4354557fc97bf7dfa677f9fd18f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a62726f61647761792f736c696d646f776e)](https://camo.githubusercontent.com/6a287c32c464e7d05895fdb3f5af9e4517eab4354557fc97bf7dfa677f9fd18f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a62726f61647761792f736c696d646f776e)[![Packagist PHP Version Support](https://camo.githubusercontent.com/6bd76363e657316a6c2f80bf0b42e74dc5d70627d09d36834dd4124f5b489a98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a62726f61647761792f736c696d646f776e)](https://camo.githubusercontent.com/6bd76363e657316a6c2f80bf0b42e74dc5d70627d09d36834dd4124f5b489a98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a62726f61647761792f736c696d646f776e)

A simple regex-based Markdown parser in PHP. Supports the following elements (and can be extended via `Slimdown::add_rule()`):

- Headers
- Links
- Bold
- Emphasis
- Deletions
- Quotes
- Code blocks
- Inline code
- Blockquotes
- Ordered/unordered lists
- Checklists
- Images

Originally hosted as a [gist here](https://gist.github.com/jbroadway/2836900).

Usage
-----

[](#usage)

Here is the general use case:

```
