PHPackages                             jidaikobo/php-markdown - 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. jidaikobo/php-markdown

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

jidaikobo/php-markdown
======================

A few additions to michelf/php-markdown

v1.0.7(11mo ago)01351MITPHP

Since Dec 28Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/jidaikobo-shibata/php-markdown)[ Packagist](https://packagist.org/packages/jidaikobo/php-markdown)[ RSS](/packages/jidaikobo-php-markdown/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (9)Used By (1)

[![MIT](https://camo.githubusercontent.com/6ba5badddc53f3e9340ce1e9090d761422f770b2b8cf142cefe3b5cb25efe54d/68747470733a2f2f637573746f6d2d69636f6e2d6261646765732e6865726f6b756170702e636f6d2f62616467652f6c6963656e73652d4d49542d3842423830412e7376673f6c6f676f3d6c6177266c6f676f436f6c6f723d7768697465)](https://github.com/jidaikobo-shibata/php-markdown?tab=MIT-1-ov-file)

jidaikobo/php-markdown
======================

[](#jidaikobophp-markdown)

A few additions to the popular [michelf/php-markdown](https://github.com/michelf/php-markdown). This library provides custom enhancements and overrides to the original Markdown parser, tailored for specific needs.

Installation
------------

[](#installation)

Install via Composer:

```
composer require jidaikobo/php-markdown
```

Usage
-----

[](#usage)

Here's how you can use the library in your project:

```
require 'vendor/autoload.php';

use Jidaikobo\MarkdownExtra;

$table = "
## heading

| Header 1 | Header 2 |
|----------|----------|
| Row 1   :| Cell 1   |
| Row 2   :| Cell 2   |
|:capt.

| scope row:| scope col |
|-----------|-----------|
| Row 1    :| Row2      |
";

$html = MarkdownExtra::defaultTransform($table);

echo $html;
```

### Custom Enhancements

[](#custom-enhancements)

This library adds specific parsing behaviors:

#### 1. Row Headers in Tables

[](#1-row-headers-in-tables)

By adding a colon (:) at the end of a cell, you can mark it as a row header (`th`):

```
| Name     | Age | City       |
|----------|-----|------------|
| Alice   :| 30  | New York   |
| Bob     :| 25  | San Francisco |
```

You can change the scope of `th` to row by adding a colon (:) to the end of the header cell:

```
| Values  :| Age | City       |
|----------|-----|------------|
| Alice   :| 30  | New York   |
| Bob     :| 25  | San Francisco |
```

#### 2. Table Captions

[](#2-table-captions)

If the last row of the table starts with a colon (:), it will be treated as a `caption`:

```
| Name    | Age | City          |
|---------|-----|---------------|
| Alice   | 30  | New York      |
| Bob     | 25  | San Francisco |
|: This is a caption for the table.
```

#### 3. Add file type and size to Link text

[](#3-add-file-type-and-size-to-link-text)

When the link destination is a file, the file type and file size are added to the link string. Sets the relationship between a URL and a path on the server.

```
MarkdownExtra::setTargetUrl('https://example.com');
MarkdownExtra::setReplacePath('/var/www/public_html/example.com');
```

```
[link text](https://example.com/files/example.zip)
```

```
link text (zip, 1.2MB)
```

#### 4. figcaption

[](#4-figcaption)

The image and em notation are arranged side by side without line breaks.

```
![](https://example.com/files/example.jpg)
*caption*
```

```

![](https://example.com/files/example.jpg)
caption

```

Requirements
------------

[](#requirements)

- PHP 7.4 or higher

License
-------

[](#license)

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT), see the [LICENSE file](https://github.com/jidaikobo-shibata/php-markdown?tab=MIT-1-ov-file) for details

Author
------

[](#author)

- [jidaikobo-shibata](https://github.com/jidaikobo-shibata/)

Link
----

[](#link)

- [jidaikobo/php-markdown - Packagist](https://packagist.org/packages/jidaikobo/php-markdown)
- [jidaikobo-shibata/php-markdown - GitHub](https://github.com/jidaikobo-shibata/php-markdown)

Acknowledgements
----------------

[](#acknowledgements)

This library builds upon the work of Michel Fortin and his excellent `michelf/php-markdown`. Learn more at the [official repository](https://github.com/michelf/php-markdown).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance51

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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 ~23 days

Recently: every ~35 days

Total

8

Last Release

342d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c4101fe06f917cfc6b6a06df8b09a612b80542833a31c4993a39b452783c50f?d=identicon)[jidaikobo](/maintainers/jidaikobo)

---

Top Contributors

[![jidaikobo-shibata](https://avatars.githubusercontent.com/u/9050388?v=4)](https://github.com/jidaikobo-shibata "jidaikobo-shibata (14 commits)")

---

Tags

markdown

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jidaikobo-php-markdown/health.svg)

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

###  Alternatives

[kartik-v/yii2-markdown

Advanced Markdown editing and conversion utilities for Yii Framework 2.0

88265.8k6](/packages/kartik-v-yii2-markdown)[vtalbot/markdown

Markdown compiler for Laravel 5

100204.2k3](/packages/vtalbot-markdown)[maglnet/magl-markdown

Provides a ZF2 View Helper to render markdown syntax. It uses third-party libraries for the rendering and you can switch between different renderers.

22178.2k4](/packages/maglnet-magl-markdown)[joomlatools/pages

Joomlatools Pages is a very fast just-in-time page generator and flexible framework that makes building websites with any CMS, API, or database fun again. It can be installed in Joomla as a component, or be used standalone

473.7k](/packages/joomlatools-pages)[cartalyst/interpret

A driver-based content rendering package, with support for HTML, Markdown &amp; plain text. You can register custom drivers for custom content types.

1914.7k](/packages/cartalyst-interpret)[jeroen/mediawiki-github

Simple MediaWiki extension for embedding GitHub hosted content in wiki pages. Supports markdown rendering and syntax highlighting.

334.4k](/packages/jeroen-mediawiki-github)

PHPackages © 2026

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