PHPackages                             izadori/parsedown-plus - 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. izadori/parsedown-plus

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

izadori/parsedown-plus
======================

An Extension for Parsedown/ParsedownExtra

v1.0.3(1y ago)38011MITPHP

Since Sep 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Izadori/parsedown-plus)[ Packagist](https://packagist.org/packages/izadori/parsedown-plus)[ RSS](/packages/izadori-parsedown-plus/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

ParsedownPlus
=============

[](#parsedownplus)

An Extension for Parsedown/ParsedownExtra.

Features
--------

[](#features)

1. Auto-generation of table of contents
    1. By specifying the table of contents tag in the text, `ParsedownPlus` inserts an automatically generated table of contents.
2. Support for mathematical expressions in LaTeX format
    1. `ParsedownPlus` recognize `$ ... $` or `$$ ... $$` as LaTeX-like formulas and do not parse in Markdown text.
    2. `$ ... $` is inline and `$$ ... $$` is block.
3. Recognize file name in fenced code
    1. `ParsedownPlus` recognize ````lang:file ... ```` and set filename in `data-filename` attribute of `` tag.

Usage
-----

[](#usage)

### With composer

[](#with-composer)

When using composer, you move to your project folder and type following command.

```
composer require izadori/parsedown-plus
```

`Parsedown` will be also installed when it is not found. If you use `ParsedownExtra`, you may install it manually.

```
composer require erusev/parsedown-extra
```

You have to require `autoload.php` to use `ParsedownPlus` in your project.

```
require_once __DIR__ . "/vender/autoload.php";

use \Izadori\ParsedownPlus\ParsedownPlus;

$parser = new ParsedownPlus();

$text = text($text); // prints: Equation of Circle $  x_{1}^{2} + x_{2}^{2} = 1  $
// parses inline text
echo $parser->line($line); // prints: It's inline text!
```

### Without composer

[](#without-composer)

When not using composer, you download `ParsedownPlus` in your project [here](https://github.com/Izadori/parsedown-plus/blob/main/parsedown-plus/ParsedownPlus.php).

To use `ParsedownPlus`, you require `Parsedown.php`. And you require `ParsedownExtra.php` if you need. Then, you require `ParsedownPlus.php`;

```
require_once __DIR__ . "/Parsedown.php";
require_once __DIR__ . "/ParsedownExtra.php"; // if you need
require_once __DIR__ . "/ParsedownPlus.php";

use /Izadori;

$parser = new ParsedownPlus();

$text = text($text); // prints: Equation of Circle $  x_{1}^{2} + x_{2}^{2} = 1  $
// parses inline text
echo $parser->line($line); // prints: It's inline text!
```

### Options

[](#options)

`ParsedownPlus` has some public variables as its options.

variabledescription`$langPrefix`A prefix added class name of language in fenced code.
The default value is `language-` for `prism.js`.`$tocTag`A associative array with two members, `'begin'` and `'end'`.
Give the start and end numbers of the heading tags recognizing as table of contents.`$tocIdentTag`Specifies a pseudo-tag for inserting a table of contents in the Markdown text as an array of strings.`$tocFormat`Specify the format to include the generated table of contents[^1](#about-automatically-generating-table-of-contentes).
`%s` is given as placeholder of the table of contents. `ParsedownPlus` uses `sprintf()` function.### About automatically generating table of contentes

[](#about-automatically-generating-table-of-contentes)

The table of contents generated by `ParsedownPlus` is an ordered-list like the following.

```

  Heading 1
  Heading 2

      Heading 2.1
      Heading 2.2

  Heading 3

```

About bugs and reports
----------------------

[](#about-bugs-and-reports)

If you find a bug, please send an [issue](https://github.com/izadori/parsedown-plus/issues/new) on the Github with the nature of the bug and the Markdown text in which it occurred.

About license
-------------

[](#about-license)

`ParsedownPlus` is complies with the [MIT license](http://opensource.org/licenses/MIT). Please refer to the [LICENSE](https://github.com/Izadori/parsedown-plus/blob/main/LICENSE) file for details.

About author
------------

[](#about-author)

- Izadori
    - [Github](https://github.com/izadori/parsedown-plus/)
    - [Web site(Japanese only) - Izadori's trial and error](https://izadori.net/)
    - [E-mail](mailto:izadori.trial.and.error@gmail.com)
    - [Twitter](https://twitter.com/izadori97362)

---

History
-------

[](#history)

### ParsedownPlus.php

[](#parsedownplusphp)

1. **2021.09.02** \[*ver.1.0.0*\]
    - Publish on Github
2. **2021.09.02** \[*ver.1.0.1*\]
    - Fixed a bug that prevented ParsedownExtra from working properly.
    - Added the function of using prefix of the class of language name in the fenced code.
3. **2021.11.28** \[*ver.1.0.2*\]
    - Modified to add `class="block-math"` to `` tags output in block math formulas.
4. **2025.04.14** \[*ver.1.0.3*\]
    - Modified to display inline LaTeX-like formulas containing inequality signs correctly.

### This document

[](#this-document)

1. **2021.09.02**
    - Added description to match ParsedownPlus ver.1.0.1.
    - Publish on Github
2. **2021.09.06**
    - Modify sample code.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance47

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~658 days

Total

3

Last Release

394d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a79fcece4a5f410ae4223774a3f5aa285fb97c1a0239e06df6ec4099d80dd42?d=identicon)[izadori](/maintainers/izadori)

---

Top Contributors

[![Izadori](https://avatars.githubusercontent.com/u/76815499?v=4)](https://github.com/Izadori "Izadori (21 commits)")

---

Tags

markdownparsedownparsedown-extraphpparsermarkdownmarkdown-extraparsedownparsedownextra

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/izadori-parsedown-plus/health.svg)

```
[![Health](https://phpackages.com/badges/izadori-parsedown-plus/health.svg)](https://phpackages.com/packages/izadori-parsedown-plus)
```

###  Alternatives

[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5933.7k](/packages/tovic-parsedown-extra-plugin)[taufik-nurrohman/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5932.3k](/packages/taufik-nurrohman-parsedown-extra-plugin)[leblanc-simon/parsedown-checkbox

An extension of Parsedown and ParsedownExtra that adds support for checkbox

181.4k1](/packages/leblanc-simon-parsedown-checkbox)[pagerange/metaparsedown

Adds ability to have meta data in markdown files parsed by eursev/parsedown or eruseve/parsedown-extra

2637.2k2](/packages/pagerange-metaparsedown)[alfredo-ramos/parsedown-extra-laravel

A Parsedown Extra package for Laravel

30155.1k1](/packages/alfredo-ramos-parsedown-extra-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
