PHPackages                             odino/php-markdown-extra-extended - 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. odino/php-markdown-extra-extended

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

odino/php-markdown-extra-extended
=================================

PHP Markdown &amp; Extra

0.1.0(13y ago)021MITPHPPHP &gt;=5.3

Since Mar 14Pushed 12y ago1 watchersCompare

[ Source](https://github.com/odino/php-markdown-extra-extended)[ Packagist](https://packagist.org/packages/odino/php-markdown-extra-extended)[ Docs](https://github.com/Brainsware/php-markdown-extra-extended)[ RSS](/packages/odino-php-markdown-extra-extended/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

PHP Markdown Extra Extended
===========================

[](#php-markdown-extra-extended)

An fork of the [PHP Markdown (Extra) project](http://michelf.com/projects/php-markdown/) (PME), extended with extra syntax, especially focused on adding support for more HTML attributes to outputted HTML, and for outputting HTML5.

Changes to syntax from PHP Markdown (Extra)
-------------------------------------------

[](#changes-to-syntax-from-php-markdown-extra)

Unless explicitly specified, existing Markdown markup works exactly as it did before. The orginal syntax is documentated here:

- [Markdown syntax](http://daringfireball.net/projects/markdown/syntax)
- [Markdown Extra syntax](http://michelf.com/projects/php-markdown/extra/)

### Line break generates a ``

[](#line-break-generates-a-br-)

In PME, when you want to insert a `` break tag using Markdown, you end a line with two or more spaces, then type return. This turned out to be more annoying than helpful in my projects, so now you just have to type return. This is also how Markdown works with GFM.

Two returns does not insert a ``, but instead creates a new paragraph as usual.

### Support for *cite* attribute on blockquotes

[](#support-for-cite-attribute-on-blockquotes)

It is now possible to add the optional *cite* attribute to the *blockquote* element.

The new, optional, syntax is:

```
> (cite url) Cited content follows ...
```

#### Example:

[](#example)

```
> (http://www.whatwg.org/) Content inside a blockquote must be quoted
> from another source, whose address, if it has one,
> may be cited in the `cite` attribute.
```

Will result in the following HTML:

```

Content inside a blockquote must be quoted
from another source, whose address, if it has one,
may be cited in the `cite` attribute.

```

#### Breaking changes from PME

[](#breaking-changes-from-pme)

The existing rules for and [formatting options](http://daringfireball.net/projects/markdown/syntax#blockquote) for blockquotes still apply. There is one small breaking changes with this addition. If your quote starts with "(" you have two have at least two spaces between the initial "&gt;" and the "(". E.g.:

```
>  (Ut brisket flank salami.) Cow cupidatat ex t-bone sirloin id.
> Sunt flank pastrami spare ribs sint id, nulla nisi.
```

Will result in the following HTML:

```

  (Ut brisket flank salami.) Cow cupidatat ex t-bone sirloin id.
  Sunt flank pastrami spare ribs sint id, nulla nisi.

```

### Fenced code block with language support and alternating fence markers (```)

[](#fenced-code-block-with-language-support-and-alternating-fence-markers-)

It is now possible to specify the language type of a code block, and use an alternatinge fence markers (```), enabling the same syntax as that of GFM.

This addition follows the [suggested way](http://dev.w3.org/html5/spec-author-view/the-code-element.html#the-code-element) to specify language by W3C.

#### Example:

[](#example-1)

```
~~~html
Ut brisket flank salami.  Cow cupidatat ex t-bone sirloin id.
~~~

```

Using alternative fence markers:

```
```html
Ut brisket flank salami.  Cow cupidatat ex t-bone sirloin id.
```

```

Both will output the following HTML:

```

Ut brisket flank salami.  Cow cupidatat ex t-bone sirloin id.

```

### Support for *figure* and *figcaption* tags

[](#support-for-figure-and-figcaption-tags)

There is now experimental support for the the HTML5 tags *[figure](http://dev.w3.org/html5/markup/figure.html)* and *[figcaption](http://dev.w3.org/html5/markup/figcaption.html)*.

A *figure* is a block level element and is created by wrapping some other content in three or more equal (=) signs.

A optional *figure caption* can be added to either the top of the figure or the bottom at the figure, right after the equal signs, wrapped in \[ and \] signs.

#### Examples

[](#examples)

This example shows a *figure* without a caption:

```
===
![](img/reference.png)
===
```

This example shows a *figure* with a caption added before the content:

```
=== [A **happy face** is good for web developers]
![](img/reference.png)
===
```

This example shows a *figure* with a caption added after the content:

```
===
![](img/reference.png)
=== [A **happy face** is good for web developers]
```

Usage
-----

[](#usage)

You need both the *markdown.php* and the *markdown\_extended.php* files, but only needs to include *markdown\_extended.php*.

```
require_once('markdown_extended.php');

// Convert markdown formatted text in $markdown to HTML
$html = MarkdownExtended($markdown);
```

License
-------

[](#license)

PHP Markdown Extra Extended is licensed under the [MIT License](http://opensource.org/licenses/MIT). See the LICENSE file for details.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.3% 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

Unknown

Total

1

Last Release

4804d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/328420?v=4)[Alex Nadalin](/maintainers/odino)[@odino](https://github.com/odino)

---

Top Contributors

[![egil](https://avatars.githubusercontent.com/u/105649?v=4)](https://github.com/egil "egil (28 commits)")[![odino](https://avatars.githubusercontent.com/u/328420?v=4)](https://github.com/odino "odino (2 commits)")[![sumpygump](https://avatars.githubusercontent.com/u/676007?v=4)](https://github.com/sumpygump "sumpygump (1 commits)")

---

Tags

markdown

### Embed Badge

![Health badge](/badges/odino-php-markdown-extra-extended/health.svg)

```
[![Health](https://phpackages.com/badges/odino-php-markdown-extra-extended/health.svg)](https://phpackages.com/packages/odino-php-markdown-extra-extended)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k151.8M727](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M700](/packages/league-commonmark)[michelf/php-markdown

PHP Markdown

3.5k52.4M344](/packages/michelf-php-markdown)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k28.6M198](/packages/league-html-to-markdown)[cebe/markdown

A super fast, highly extensible markdown parser for PHP

1.0k32.5M136](/packages/cebe-markdown)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)

PHPackages © 2026

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